[heap] Enter global safepoint scope for snapshot creation after GC [v8/v8 : main]

0 views
Skip to first unread message

Michael Lippautz (Gerrit)

unread,
Mar 23, 2026, 7:04:00 AM (yesterday) Mar 23
to Dominik Inführ, devtools-...@chromium.org, v8-re...@googlegroups.com
Attention needed from Dominik Inführ

Michael Lippautz voted and added 2 comments

Votes added by Michael Lippautz

Commit-Queue+1

2 comments

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

ptal

File src/profiler/heap-snapshot-generator.cc
Line 3432, Patchset 2 (Latest):bool HeapSnapshotGenerator::GenerateSnapshotAfterGC() {
Michael Lippautz . unresolved

I want to refactor away this method in a follow up. It does almost the same thing is the regular `GenerateSnapshot()`, without the GC.

(There should be not progress counter without it being passed to the generator in first place.)

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: I031aecf6e7566a2db0935d2f7e50593a9d4d9df8
Gerrit-Change-Number: 7693032
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
Gerrit-Comment-Date: Mon, 23 Mar 2026 11:03:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
Mar 23, 2026, 7:05:05 AM (yesterday) Mar 23
to V8 LUCI CQ, Dominik Inführ, devtools-...@chromium.org, v8-re...@googlegroups.com
Attention needed from Dominik Inführ

Michael Lippautz voted Commit-Queue+1

Commit-Queue+1
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: I031aecf6e7566a2db0935d2f7e50593a9d4d9df8
Gerrit-Change-Number: 7693032
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
Gerrit-Comment-Date: Mon, 23 Mar 2026 11:05:01 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Dominik Inführ (Gerrit)

unread,
Mar 23, 2026, 7:47:40 AM (yesterday) Mar 23
to Michael Lippautz, V8 LUCI CQ, devtools-...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Dominik Inführ voted and added 2 comments

Votes added by Dominik Inführ

Code-Review+1

2 comments

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

Thanks for fixing! LGTM

File src/profiler/heap-snapshot-generator.cc
Line 3432, Patchset 2:bool HeapSnapshotGenerator::GenerateSnapshotAfterGC() {
Michael Lippautz . resolved

I want to refactor away this method in a follow up. It does almost the same thing is the regular `GenerateSnapshot()`, without the GC.

(There should be not progress counter without it being passed to the generator in first place.)

Dominik Inführ

+1

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
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: I031aecf6e7566a2db0935d2f7e50593a9d4d9df8
Gerrit-Change-Number: 7693032
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Mon, 23 Mar 2026 11:47:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
satisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
Mar 23, 2026, 8:28:24 AM (24 hours ago) Mar 23
to Dominik Inführ, V8 LUCI CQ, devtools-...@chromium.org, v8-re...@googlegroups.com

Michael Lippautz voted Commit-Queue+2

Commit-Queue+2
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: I031aecf6e7566a2db0935d2f7e50593a9d4d9df8
Gerrit-Change-Number: 7693032
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Mon, 23 Mar 2026 12:28:19 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
Mar 23, 2026, 10:05:20 AM (22 hours ago) Mar 23
to Michael Achenbach, Hannes Payer, AyeAye, Dominik Inführ, V8 LUCI CQ, mlippau...@chromium.org, oilpan-r...@chromium.org, devtools-...@chromium.org, v8-re...@googlegroups.com
Attention needed from Dominik Inführ and Michael Achenbach

Michael Lippautz added 2 comments

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

+machenbach for a test question

File test/mjsunit/regress/regress-494583765.js
Line 5, Patchset 5 (Latest):// Flags: --expose-gc --shared-heap --heap-snapshot-on-gc=0
Michael Lippautz . unresolved

This flag makes us create snapshots on every GC, in the current working directory.

@mache...@chromium.org: I have flagged the test as slow already. Should we avoid it in first place?

Open in Gerrit

Related details

Attention is currently required from:
  • Dominik Inführ
  • Michael Achenbach
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: I031aecf6e7566a2db0935d2f7e50593a9d4d9df8
Gerrit-Change-Number: 7693032
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Michael Achenbach <mache...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Achenbach <mache...@chromium.org>
Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
Gerrit-Comment-Date: Mon, 23 Mar 2026 14:05:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Achenbach (Gerrit)

unread,
Mar 23, 2026, 10:48:53 AM (21 hours ago) Mar 23
to Michael Lippautz, Hannes Payer, AyeAye, Dominik Inführ, V8 LUCI CQ, mlippau...@chromium.org, oilpan-r...@chromium.org, devtools-...@chromium.org, v8-re...@googlegroups.com
Attention needed from Dominik Inführ and Michael Lippautz

Michael Achenbach added 1 comment

File test/mjsunit/regress/regress-494583765.js
Line 5, Patchset 5:// Flags: --expose-gc --shared-heap --heap-snapshot-on-gc=0
Michael Lippautz . unresolved

This flag makes us create snapshots on every GC, in the current working directory.

@mache...@chromium.org: I have flagged the test as slow already. Should we avoid it in first place?

Michael Achenbach

Sounds like something we'd rather avoid. The bots won't care much, but I assume this will negatively affect developers? Is the file .gitignored in V8? Also, would it ever clash if we run this test concurrently and both processes want to write to this file?

Would it be possible to add yet another flag, and if that is passed, write the file to /dev/null or skip writing and dump to stdout instead?

Open in Gerrit

Related details

Attention is currently required from:
  • Dominik Inführ
  • 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: I031aecf6e7566a2db0935d2f7e50593a9d4d9df8
Gerrit-Change-Number: 7693032
Gerrit-PatchSet: 6
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Michael Achenbach <mache...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
Gerrit-Comment-Date: Mon, 23 Mar 2026 14:48:49 +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,
Mar 23, 2026, 10:59:27 AM (21 hours ago) Mar 23
to Michael Achenbach, Hannes Payer, AyeAye, Dominik Inführ, V8 LUCI CQ, mlippau...@chromium.org, oilpan-r...@chromium.org, devtools-...@chromium.org, v8-re...@googlegroups.com
Attention needed from Dominik Inführ and Michael Achenbach

Michael Lippautz voted and added 1 comment

Votes added by Michael Lippautz

Commit-Queue+1

1 comment

File test/mjsunit/regress/regress-494583765.js
Line 5, Patchset 5:// Flags: --expose-gc --shared-heap --heap-snapshot-on-gc=0
Michael Lippautz . resolved

This flag makes us create snapshots on every GC, in the current working directory.

@mache...@chromium.org: I have flagged the test as slow already. Should we avoid it in first place?

Michael Achenbach

Sounds like something we'd rather avoid. The bots won't care much, but I assume this will negatively affect developers? Is the file .gitignored in V8? Also, would it ever clash if we run this test concurrently and both processes want to write to this file?

Would it be possible to add yet another flag, and if that is passed, write the file to /dev/null or skip writing and dump to stdout instead?

Michael Lippautz

Thanks, we already had a flag for the filename, so I can just pass that to `/dev/null` and only enable on Linux.

Open in Gerrit

Related details

Attention is currently required from:
  • Dominik Inführ
  • Michael Achenbach
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: I031aecf6e7566a2db0935d2f7e50593a9d4d9df8
    Gerrit-Change-Number: 7693032
    Gerrit-PatchSet: 8
    Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Michael Achenbach <mache...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Michael Achenbach <mache...@chromium.org>
    Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Comment-Date: Mon, 23 Mar 2026 14:59:23 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Michael Achenbach <mache...@chromium.org>
    Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Michael Achenbach (Gerrit)

    unread,
    Mar 23, 2026, 11:17:09 AM (21 hours ago) Mar 23
    to Michael Lippautz, Hannes Payer, AyeAye, Dominik Inführ, V8 LUCI CQ, mlippau...@chromium.org, oilpan-r...@chromium.org, devtools-...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Dominik Inführ and Michael Lippautz

    Michael Achenbach voted and added 1 comment

    Votes added by Michael Achenbach

    Code-Review+1

    1 comment

    Patchset-level comments
    File-level comment, Patchset 8 (Latest):
    Michael Achenbach . resolved

    Lgtm on test stuff.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Dominik Inführ
    • Michael Lippautz
    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: I031aecf6e7566a2db0935d2f7e50593a9d4d9df8
    Gerrit-Change-Number: 7693032
    Gerrit-PatchSet: 8
    Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Michael Achenbach <mache...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Comment-Date: Mon, 23 Mar 2026 15:17:05 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Dominik Inführ (Gerrit)

    unread,
    5:04 AM (3 hours ago) 5:04 AM
    to Michael Lippautz, Michael Achenbach, Hannes Payer, AyeAye, V8 LUCI CQ, mlippau...@chromium.org, oilpan-r...@chromium.org, devtools-...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Michael Lippautz

    Dominik Inführ voted and added 2 comments

    Votes added by Dominik Inführ

    Code-Review+1

    2 comments

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

    LGTM with comment

    File src/heap/cppgc-js/cpp-heap.cc
    Line 235, Patchset 9 (Latest): if (v8_flags.heap_snapshot_on_oom && !isolate->has_active_deserializer()) {
    Dominik Inführ . unresolved

    I think it would be nice in general if we would be able to take a snapshot every time we are able to GC. Are some verifications in the heap snapshot generator too strict here that we could relax to allow this again?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Lippautz
    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: I031aecf6e7566a2db0935d2f7e50593a9d4d9df8
      Gerrit-Change-Number: 7693032
      Gerrit-PatchSet: 9
      Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
      Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
      Gerrit-Reviewer: Michael Achenbach <mache...@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: Tue, 24 Mar 2026 09:04:18 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Michael Lippautz (Gerrit)

      unread,
      5:21 AM (3 hours ago) 5:21 AM
      to Dominik Inführ, Michael Achenbach, Hannes Payer, AyeAye, V8 LUCI CQ, mlippau...@chromium.org, oilpan-r...@chromium.org, devtools-...@chromium.org, v8-re...@googlegroups.com

      Michael Lippautz voted and added 1 comment

      Votes added by Michael Lippautz

      Commit-Queue+2

      1 comment

      File src/heap/cppgc-js/cpp-heap.cc
      Line 235, Patchset 9 (Latest): if (v8_flags.heap_snapshot_on_oom && !isolate->has_active_deserializer()) {
      Dominik Inführ . resolved

      I think it would be nice in general if we would be able to take a snapshot every time we are able to GC. Are some verifications in the heap snapshot generator too strict here that we could relax to allow this again?

      Michael Lippautz

      That's already a TODO at the site where the deserializer is recorded. Not sure how much work it actually is. The state is certainly inconsistent though.

      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: I031aecf6e7566a2db0935d2f7e50593a9d4d9df8
        Gerrit-Change-Number: 7693032
        Gerrit-PatchSet: 9
        Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
        Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
        Gerrit-Reviewer: Michael Achenbach <mache...@chromium.org>
        Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
        Gerrit-CC: Hannes Payer <hpa...@chromium.org>
        Gerrit-Comment-Date: Tue, 24 Mar 2026 09:21:13 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Dominik Inführ <dinf...@chromium.org>
        satisfied_requirement
        open
        diffy

        V8 LUCI CQ (Gerrit)

        unread,
        5:23 AM (3 hours ago) 5:23 AM
        to Michael Lippautz, Dominik Inführ, Michael Achenbach, Hannes Payer, AyeAye, mlippau...@chromium.org, oilpan-r...@chromium.org, devtools-...@chromium.org, v8-re...@googlegroups.com

        V8 LUCI CQ submitted the change

        Change information

        Commit message:
        [heap] Enter global safepoint scope for snapshot creation after GC

        The regular snapshot creation already enters the global safepoint which
        is necessary to to shared space handling.

        This basically is the same as http://crrev.com/c/6994961
        Fixed: 494583765
        Change-Id: I031aecf6e7566a2db0935d2f7e50593a9d4d9df8
        Reviewed-by: Michael Achenbach <mache...@chromium.org>
        Reviewed-by: Dominik Inführ <dinf...@chromium.org>
        Commit-Queue: Michael Lippautz <mlip...@chromium.org>
        Cr-Commit-Position: refs/heads/main@{#105989}
        Files:
        • M src/execution/isolate.h
        • M src/heap/cppgc-js/cpp-heap.cc
        • M src/heap/heap.cc
        • M src/profiler/heap-snapshot-generator.cc
        • M test/mjsunit/mjsunit.status
        • A test/mjsunit/regress/regress-494583765.js
        Change size: M
        Delta: 6 files changed, 32 insertions(+), 19 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Michael Achenbach, +1 by Dominik Inführ
        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: I031aecf6e7566a2db0935d2f7e50593a9d4d9df8
        Gerrit-Change-Number: 7693032
        Gerrit-PatchSet: 10
        Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
        Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
        Gerrit-Reviewer: Michael Achenbach <mache...@chromium.org>
        Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages