[heap, profiler] Avoid EmbedderGraph API for cpp-snapshot.cc [v8/v8 : main]

0 views
Skip to first unread message

Michael Lippautz (Gerrit)

unread,
May 15, 2026, 12:32:43 PMMay 15
to Dominik Inführ, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Hannes Payer, devtools-...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Dominik Inführ

Michael Lippautz voted and added 1 comment

Votes added by Michael Lippautz

Code-Review+1

1 comment

File src/heap/cppgc-js/cpp-snapshot.cc
Line 603, Patchset 9 (Latest): PrePassIterator pre_pass_iterator(
Michael Lippautz . unresolved

For future CLs: Please do not add merging phases into larger refactorings. I think this is okay here but I was surprised to see the actual algorithm being changed as well.

Open in Gerrit

Related details

Attention is currently required from:
  • Dominik Inführ
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • 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: I4db565b083fc605a802de7b306d9e1b14de9f78c
Gerrit-Change-Number: 7843192
Gerrit-PatchSet: 9
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, 15 May 2026 16:32:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Dominik Inführ (Gerrit)

unread,
May 18, 2026, 7:50:06 AM (13 days ago) May 18
to Michael Lippautz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Hannes Payer, devtools-...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Dominik Inführ added 2 comments

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

PTALA. I rebased this CL and added more tests. I also removed a DCHECK I added in this CL again. One test triggered that DCHECK.

File src/heap/cppgc-js/cpp-snapshot.cc
Line 603, Patchset 9: PrePassIterator pre_pass_iterator(
Michael Lippautz . unresolved

For future CLs: Please do not add merging phases into larger refactorings. I think this is okay here but I was surprised to see the actual algorithm being changed as well.

Dominik Inführ

Sorry, I should have made this more clear when posting the CL. This change was necessary to keep merging of wrappers working as expected. We now immediately create HeapEntries in LiveObjectsIterator, previously we only created EmbedderNodes there. So now we need to know earlier what objects we need to merge sooner. We even need to know all wrappers before iterating the stack. Because during stack iteration we already create HeapEntries. That's why I needed to add this to the pre-pass.

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: I4db565b083fc605a802de7b306d9e1b14de9f78c
Gerrit-Change-Number: 7843192
Gerrit-PatchSet: 14
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, 18 May 2026 11:50:02 +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 18, 2026, 8:32:06 AM (13 days ago) May 18
to Dominik Inführ, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Hannes Payer, devtools-...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Dominik Inführ

Michael Lippautz voted and added 1 comment

Votes added by Michael Lippautz

Code-Review+1

1 comment

File src/heap/cppgc-js/cpp-snapshot.cc
Line 603, Patchset 9: PrePassIterator pre_pass_iterator(
Michael Lippautz . resolved

For future CLs: Please do not add merging phases into larger refactorings. I think this is okay here but I was surprised to see the actual algorithm being changed as well.

Dominik Inführ

Sorry, I should have made this more clear when posting the CL. This change was necessary to keep merging of wrappers working as expected. We now immediately create HeapEntries in LiveObjectsIterator, previously we only created EmbedderNodes there. So now we need to know earlier what objects we need to merge sooner. We even need to know all wrappers before iterating the stack. Because during stack iteration we already create HeapEntries. That's why I needed to add this to the pre-pass.

Michael Lippautz

Acknowledged

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: I4db565b083fc605a802de7b306d9e1b14de9f78c
Gerrit-Change-Number: 7843192
Gerrit-PatchSet: 14
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: Mon, 18 May 2026 12:32:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
Comment-In-Reply-To: Dominik Inführ <dinf...@chromium.org>
satisfied_requirement
open
diffy

Dominik Inführ (Gerrit)

unread,
May 18, 2026, 8:38:26 AM (13 days ago) May 18
to Michael Lippautz, v8-s...@luci-project-accounts.iam.gserviceaccount.com, Hannes Payer, devtools-...@chromium.org, 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
File-level comment, Patchset 14 (Latest):
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: I4db565b083fc605a802de7b306d9e1b14de9f78c
Gerrit-Change-Number: 7843192
Gerrit-PatchSet: 14
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: Mon, 18 May 2026 12:38:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

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

unread,
May 18, 2026, 8:40:33 AM (13 days ago) May 18
to Dominik Inführ, Michael Lippautz, Hannes Payer, devtools-...@chromium.org, 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, profiler] Avoid EmbedderGraph API for cpp-snapshot.cc

So far cpp-snapshot.cc was used through the EmbedderGraph public API
from the heap snapshot generator. This CL avoids going through that
API, so that cpp-snapshot.cc can directly create HeapEntries instead
of EmbedderNodes.
Bug: 497855658
Change-Id: I4db565b083fc605a802de7b306d9e1b14de9f78c
Commit-Queue: Dominik Inführ <dinf...@chromium.org>
Reviewed-by: Michael Lippautz <mlip...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#107383}
Files:
  • M src/DEPS
  • M src/heap/cppgc-js/cpp-heap.cc
  • M src/heap/cppgc-js/cpp-snapshot.cc
  • M src/heap/cppgc-js/cpp-snapshot.h
  • M src/profiler/heap-profiler.cc
  • M src/profiler/heap-profiler.h
  • M src/profiler/heap-snapshot-generator.cc
  • M src/profiler/heap-snapshot-generator.h
  • M test/unittests/heap/cppgc-js/unified-heap-snapshot-unittest.cc
  • M test/unittests/profiler/heap-snapshot-utils.cc
  • M test/unittests/profiler/heap-snapshot-utils.h
Change size: L
Delta: 11 files changed, 332 insertions(+), 258 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: I4db565b083fc605a802de7b306d9e1b14de9f78c
Gerrit-Change-Number: 7843192
Gerrit-PatchSet: 15
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