New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 738368 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Feature

Blocking:
issue 651354
issue 738865



Sign in to add a comment

V8 GC: Switch to instance-based visitors

Project Member Reported by mlippautz@chromium.org, Jun 30 2017

Issue description

Tracking bug for switching to instance-based visitors and getting rid of static visitors.

The upsides are
- Potential for further inlining since we do not have raw callbacks in a table anymore but rather rely on vtables and devirtualization.
- Easy to carry around state. This makes evaluating anything parallel/concurrent based on these visitors easier.
- No more static global tables: We currently have 4 tables for the scavenger (logging, marking x2), one for the incremental marker, and one for the full collector.

CLs landed so far (chronologically sorted):

07b1113252bd487aa20d6459e03d125edf6d5e47 [heap] Move first-level on Scavenger to instance-based visitor
b45f20665173fb89310f6b97c53d4650eecb7d7a [heap] MinorMC: Reuse NewSpaceVisitor for marking
c2217587705755f83a496f968c6efdbeafc78d82 [heap] Speed up instance visitor
bfad25a8fb619774ebf71e36fbbd9eb6e173158e [heap] Further improve instance-based visitor
bb786d61b4b784101842aa7d6c921eb364ca59a9 [heap] Further devirtualizing for instance-based visitor
3dffe2e3adda823c8eb951bd83a9f7a0da1a31cb [heap] MC: Switch to instance-based visitor
 
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/ebc98f7f04a2f18faa3c6d8727feab86f9f2eb0e

commit ebc98f7f04a2f18faa3c6d8727feab86f9f2eb0e
Author: Michael Lippautz <mlippautz@chromium.org>
Date: Fri Jun 30 14:22:04 2017

[heap] Redo scavenging logic

Replace the second level visitation with a much simpler logic that
just separately dispatches the special cases. All other cases can
use a dispatch that just evacuates an object based on size.

This is similar to the logic used in the mark-compact collector. The
goal is to align behaviors as much as possible, highlighting and 
fixing performance issues in the different behaviors.

This CL is mechanical as possible. A followup will clean
up the naming scheme and dispatching.

Bug:  chromium:738368 
Change-Id: Ia5a426c5ebb25230000b127580c300c97cff8b1b
Reviewed-on: https://chromium-review.googlesource.com/558060
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46364}
[modify] https://crrev.com/ebc98f7f04a2f18faa3c6d8727feab86f9f2eb0e/src/heap/heap.cc
[modify] https://crrev.com/ebc98f7f04a2f18faa3c6d8727feab86f9f2eb0e/src/heap/scavenger-inl.h
[modify] https://crrev.com/ebc98f7f04a2f18faa3c6d8727feab86f9f2eb0e/src/heap/scavenger.cc
[modify] https://crrev.com/ebc98f7f04a2f18faa3c6d8727feab86f9f2eb0e/src/heap/scavenger.h

Labels: -OS-Fuchsia
Blocking: 738865
Status: Fixed (was: Started)
Project Member

Comment 6 by bugdroid1@chromium.org, Jul 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/1e9a57bd05711ba7dadfdc57b1b088644e35ae69

commit 1e9a57bd05711ba7dadfdc57b1b088644e35ae69
Author: Michael Lippautz <mlippautz@chromium.org>
Date: Mon Jul 03 12:43:47 2017

[heap] Remove dead leftovers from visitor migration

Bug:  chromium:738368 
Change-Id: Iebbfc258be7f1997dc441ccdf12c38635901f732
Reviewed-on: https://chromium-review.googlesource.com/558911
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46386}
[modify] https://crrev.com/1e9a57bd05711ba7dadfdc57b1b088644e35ae69/src/heap/objects-visiting-inl.h
[modify] https://crrev.com/1e9a57bd05711ba7dadfdc57b1b088644e35ae69/src/heap/objects-visiting.h

Project Member

Comment 7 by bugdroid1@chromium.org, Jul 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/9cb2211cb2153c9ae11e9b0613dc977bb33c2517

commit 9cb2211cb2153c9ae11e9b0613dc977bb33c2517
Author: Michael Lippautz <mlippautz@chromium.org>
Date: Mon Jul 03 14:38:22 2017

[heap] Remove StaticVisitorBase; Introduce Map::GetVisitorId

Bug:  chromium:738368 
Change-Id: I749517391f9d5dd0827f3d37f975f6c61542d1ff
Reviewed-on: https://chromium-review.googlesource.com/558914
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46391}
[modify] https://crrev.com/9cb2211cb2153c9ae11e9b0613dc977bb33c2517/src/heap/heap.cc
[modify] https://crrev.com/9cb2211cb2153c9ae11e9b0613dc977bb33c2517/src/heap/heap.h
[modify] https://crrev.com/9cb2211cb2153c9ae11e9b0613dc977bb33c2517/src/heap/objects-visiting-inl.h
[modify] https://crrev.com/9cb2211cb2153c9ae11e9b0613dc977bb33c2517/src/heap/objects-visiting.h
[modify] https://crrev.com/9cb2211cb2153c9ae11e9b0613dc977bb33c2517/src/heap/scavenger-inl.h
[modify] https://crrev.com/9cb2211cb2153c9ae11e9b0613dc977bb33c2517/src/heap/scavenger.h
[modify] https://crrev.com/9cb2211cb2153c9ae11e9b0613dc977bb33c2517/src/objects-debug.cc
[modify] https://crrev.com/9cb2211cb2153c9ae11e9b0613dc977bb33c2517/src/objects-inl.h
[modify] https://crrev.com/9cb2211cb2153c9ae11e9b0613dc977bb33c2517/src/objects.cc
[modify] https://crrev.com/9cb2211cb2153c9ae11e9b0613dc977bb33c2517/src/objects/map.h

Project Member

Comment 8 by bugdroid1@chromium.org, Aug 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/6475ae2025d552d18e6f2ca10a63854ad729ccca

commit 6475ae2025d552d18e6f2ca10a63854ad729ccca
Author: Michael Lippautz <mlippautz@chromium.org>
Date: Thu Aug 24 15:56:32 2017

Remove left-over handling for StaticVisitors

Bug:  chromium:738368 
Change-Id: I4867b90c639d8d5315e0caa22285e7ddbdab44f9
Reviewed-on: https://chromium-review.googlesource.com/632682
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47580}
[modify] https://crrev.com/6475ae2025d552d18e6f2ca10a63854ad729ccca/src/arm/assembler-arm-inl.h
[modify] https://crrev.com/6475ae2025d552d18e6f2ca10a63854ad729ccca/src/arm64/assembler-arm64-inl.h
[modify] https://crrev.com/6475ae2025d552d18e6f2ca10a63854ad729ccca/src/assembler.h
[modify] https://crrev.com/6475ae2025d552d18e6f2ca10a63854ad729ccca/src/ia32/assembler-ia32-inl.h
[modify] https://crrev.com/6475ae2025d552d18e6f2ca10a63854ad729ccca/src/mips/assembler-mips-inl.h
[modify] https://crrev.com/6475ae2025d552d18e6f2ca10a63854ad729ccca/src/mips64/assembler-mips64-inl.h
[modify] https://crrev.com/6475ae2025d552d18e6f2ca10a63854ad729ccca/src/objects-body-descriptors-inl.h
[modify] https://crrev.com/6475ae2025d552d18e6f2ca10a63854ad729ccca/src/objects-body-descriptors.h
[modify] https://crrev.com/6475ae2025d552d18e6f2ca10a63854ad729ccca/src/ppc/assembler-ppc-inl.h
[modify] https://crrev.com/6475ae2025d552d18e6f2ca10a63854ad729ccca/src/profiler/heap-snapshot-generator.cc
[modify] https://crrev.com/6475ae2025d552d18e6f2ca10a63854ad729ccca/src/s390/assembler-s390-inl.h
[modify] https://crrev.com/6475ae2025d552d18e6f2ca10a63854ad729ccca/src/x64/assembler-x64-inl.h

Sign in to add a comment