[heap] Remove visibility SCC pass [v8/v8 : main]

0 views
Skip to first unread message

Dominik Inführ (Gerrit)

unread,
May 8, 2026, 5:00:01 AMMay 8
to Michael Lippautz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Hannes Payer, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Dominik Inführ voted and added 1 comment

Votes added by Dominik Inführ

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 12 (Latest):
Dominik Inführ . resolved

PTAL

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I163ba7e71beb9e5bf62ae1696822483b01c7bc83
Gerrit-Change-Number: 7806467
Gerrit-PatchSet: 12
Gerrit-Owner: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Fri, 08 May 2026 08:59:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Dominik Inführ (Gerrit)

unread,
May 8, 2026, 5:45:36 AMMay 8
to Michael Lippautz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Hannes Payer, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Dominik Inführ added 1 comment

Patchset-level comments
Dominik Inführ . resolved

Note that I added tests for WeakContainers in this CL: https://chromium-review.git.corp.google.com/c/v8/v8/+/7817336.

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I163ba7e71beb9e5bf62ae1696822483b01c7bc83
Gerrit-Change-Number: 7806467
Gerrit-PatchSet: 12
Gerrit-Owner: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Fri, 08 May 2026 09:45:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
May 8, 2026, 11:17:00 AMMay 8
to Dominik Inführ, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Hannes Payer, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Dominik Inführ

Michael Lippautz added 3 comments

Commit Message
Line 15, Patchset 12 (Latest):heap and adds their edges. But for this pass we need to know whether
Michael Lippautz . unresolved

I don't understand this sentence

File src/heap/cppgc-js/cpp-snapshot.cc
Line 28, Patchset 12 (Latest):#include "src/heap/marking-worklist-inl.h"
Michael Lippautz . unresolved

Since you are here: More includes to clean up?

Line 656, Patchset 12 (Latest): // (4) Add persistent roots.
Michael Lippautz . unresolved

Would it be problematic to move that into the front as well? Basically cluster all roots.

Open in Gerrit

Related details

Attention is currently required from:
  • Dominik Inführ
Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I163ba7e71beb9e5bf62ae1696822483b01c7bc83
    Gerrit-Change-Number: 7806467
    Gerrit-PatchSet: 12
    Gerrit-Owner: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Comment-Date: Fri, 08 May 2026 15:16:57 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Dominik Inführ (Gerrit)

    unread,
    May 11, 2026, 3:27:34 AMMay 11
    to Michael Lippautz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Hannes Payer, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Michael Lippautz

    Dominik Inführ added 5 comments

    Patchset-level comments
    File-level comment, Patchset 16 (Latest):
    Dominik Inführ . resolved

    I should've addressed all comments now. I also changed how we trace weak container - see the comment I added for this on the CL.

    Commit Message
    Line 15, Patchset 12:heap and adds their edges. But for this pass we need to know whether
    Michael Lippautz . resolved

    I don't understand this sentence

    Dominik Inführ

    I updated this. Should be better now.

    File src/heap/cppgc-js/cpp-snapshot.cc
    Line 28, Patchset 12:#include "src/heap/marking-worklist-inl.h"
    Michael Lippautz . resolved

    Since you are here: More includes to clean up?

    Dominik Inführ

    I removed the includes that were suggested as not used.

    Line 402, Patchset 16 (Latest): if (weak_desc && !graph_builder_.IsReachableFromStack(header)) {
    Dominik Inführ . unresolved

    Note that I changed this here as well. We simply call the regular Trace() method if the weak container is on the stack. This visitor strongifies the key itself (both for the unit test and the HeapHashTableBacking in production) so we don't need to add that strong edge to the key explicitly in VisitEphemeron() anymore.

    Line 656, Patchset 12: // (4) Add persistent roots.
    Michael Lippautz . resolved

    Would it be problematic to move that into the front as well? Basically cluster all roots.

    Dominik Inführ

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Lippautz
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I163ba7e71beb9e5bf62ae1696822483b01c7bc83
    Gerrit-Change-Number: 7806467
    Gerrit-PatchSet: 16
    Gerrit-Owner: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Comment-Date: Mon, 11 May 2026 07:27:31 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michael Lippautz (Gerrit)

    unread,
    May 13, 2026, 4:26:03 AMMay 13
    to Dominik Inführ, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Hannes Payer, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Dominik Inführ

    Michael Lippautz voted and added 2 comments

    Votes added by Michael Lippautz

    Code-Review+1

    2 comments

    Patchset-level comments
    File-level comment, Patchset 19 (Latest):
    Michael Lippautz . resolved

    As discussed offline, this seems to be actually okay in terms of how many nodes we show and snapshot sizes we produce.

    File src/heap/cppgc-js/cpp-snapshot.cc
    Line 402, Patchset 16: if (weak_desc && !graph_builder_.IsReachableFromStack(header)) {
    Dominik Inführ . resolved

    Note that I changed this here as well. We simply call the regular Trace() method if the weak container is on the stack. This visitor strongifies the key itself (both for the unit test and the HeapHashTableBacking in production) so we don't need to add that strong edge to the key explicitly in VisitEphemeron() anymore.

    Michael Lippautz

    I think this is also what the regular marker does. It will pick up the strong Trace() method for any object found on the stack.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dominik Inführ
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I163ba7e71beb9e5bf62ae1696822483b01c7bc83
    Gerrit-Change-Number: 7806467
    Gerrit-PatchSet: 19
    Gerrit-Owner: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Comment-Date: Wed, 13 May 2026 08:25:59 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Dominik Inführ <dinf...@chromium.org>
    satisfied_requirement
    open
    diffy

    Dominik Inführ (Gerrit)

    unread,
    May 13, 2026, 4:26:32 AMMay 13
    to Michael Lippautz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Hannes Payer, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com

    Dominik Inführ voted and added 1 comment

    Votes added by Dominik Inführ

    Commit-Queue+2

    1 comment

    Patchset-level comments
    Dominik Inführ . resolved

    Thanks for the review!

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I163ba7e71beb9e5bf62ae1696822483b01c7bc83
    Gerrit-Change-Number: 7806467
    Gerrit-PatchSet: 19
    Gerrit-Owner: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Comment-Date: Wed, 13 May 2026 08:26:28 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    v8-scoped@luci-project-accounts.iam.gserviceaccount.com (Gerrit)

    unread,
    May 13, 2026, 4:29:54 AMMay 13
    to Dominik Inführ, Michael Lippautz, Hannes Payer, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com

    v8-s...@luci-project-accounts.iam.gserviceaccount.com submitted the change

    Change information

    Commit message:
    [heap] Remove visibility SCC pass

    Because "expose internals" is now always enabled, the visibility
    filtering pass in cpp-snapshot.cc doesn't filter out any objects
    anymore. This CL therefore drops this pass, which also allows us
    to drop StateBase and its derived classes.

    There is one main pass which iterates all the cppgc objects in the
    heap and adds their edges. In order to do this pass we need to
    compute some additional information beforehand. We need to know:
    * Whether object is weak container (which requires additional heap
    iteration). Weak containers are visited using their weak tracing
    callback.
    * And whether the object is reachable from stack. This is again needed
    for weak containers. The weak container is visited strongly in this
    case.
    Bug: 497855658
    Change-Id: I163ba7e71beb9e5bf62ae1696822483b01c7bc83
    Reviewed-by: Michael Lippautz <mlip...@chromium.org>
    Commit-Queue: Dominik Inführ <dinf...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#107288}
    Files:
    • M src/heap/cppgc-js/cpp-snapshot.cc
    Change size: XL
    Delta: 1 file changed, 248 insertions(+), 761 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Michael Lippautz
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I163ba7e71beb9e5bf62ae1696822483b01c7bc83
    Gerrit-Change-Number: 7806467
    Gerrit-PatchSet: 20
    Gerrit-Owner: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages