[cppgc] Sweep based on live bytes on pages [v8/v8 : main]

0 views
Skip to first unread message

Michael Lippautz (Gerrit)

unread,
Jun 21, 2024, 7:00:44 AMJun 21
to Omer Katz, AyeAye, chrom...@appspot.gserviceaccount.com, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, victorgo...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Omer Katz

Michael Lippautz voted and added 1 comment

Votes added by Michael Lippautz

Commit-Queue+1

1 comment

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

ptal

Open in Gerrit

Related details

Attention is currently required from:
  • Omer Katz
Submit Requirements:
  • requirement is not satisfiedCode-Review
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: I8c6d4cd037c8fb1b521d1a43606d673fe0d370a1
Gerrit-Change-Number: 5645442
Gerrit-PatchSet: 12
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Omer Katz <omer...@chromium.org>
Gerrit-Comment-Date: Fri, 21 Jun 2024 11:00:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
unsatisfied_requirement
open
diffy

Omer Katz (Gerrit)

unread,
Jun 21, 2024, 10:36:07 AMJun 21
to Michael Lippautz, AyeAye, chrom...@appspot.gserviceaccount.com, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, victorgo...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Omer Katz voted and added 5 comments

Votes added by Omer Katz

Code-Review+1

5 comments

Patchset-level comments
Commit Message
Line 14, Patchset 13 (Latest):there no progress via tasks as we are effectively getting new pages.
Omer Katz . unresolved

there is

Line 17, Patchset 13 (Latest):This this CL we bring back sweeping on allocation instead of bailing
Omer Katz . unresolved

brings

Line 17, Patchset 13 (Latest):This this CL we bring back sweeping on allocation instead of bailing
Omer Katz . unresolved

duplicate

Line 18, Patchset 13 (Latest):out depending on the limit. At the same time wee introduce per-page
Omer Katz . unresolved

we

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Review
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: I8c6d4cd037c8fb1b521d1a43606d673fe0d370a1
Gerrit-Change-Number: 5645442
Gerrit-PatchSet: 13
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Fri, 21 Jun 2024 14:36:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
Jun 24, 2024, 3:41:09 AMJun 24
to Omer Katz, AyeAye, chrom...@appspot.gserviceaccount.com, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, victorgo...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com

Michael Lippautz voted and added 4 comments

Votes added by Michael Lippautz

Commit-Queue+1

4 comments

Commit Message
Line 14, Patchset 13:there no progress via tasks as we are effectively getting new pages.
Omer Katz . resolved

there is

Michael Lippautz

Done

Line 17, Patchset 13:This this CL we bring back sweeping on allocation instead of bailing
Omer Katz . resolved

duplicate

Michael Lippautz

Done

Line 17, Patchset 13:This this CL we bring back sweeping on allocation instead of bailing
Omer Katz . resolved

brings

Michael Lippautz

Done

Line 18, Patchset 13:out depending on the limit. At the same time wee introduce per-page
Omer Katz . resolved

we

Michael Lippautz

Done

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Review
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: I8c6d4cd037c8fb1b521d1a43606d673fe0d370a1
Gerrit-Change-Number: 5645442
Gerrit-PatchSet: 14
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Comment-Date: Mon, 24 Jun 2024 07:41:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Omer Katz <omer...@chromium.org>
satisfied_requirement
open
diffy

chromeperf@appspot.gserviceaccount.com (Gerrit)

unread,
Jun 24, 2024, 4:59:01 AMJun 24
to Michael Lippautz, Omer Katz, AyeAye, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, victorgo...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz
Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Review
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: I8c6d4cd037c8fb1b521d1a43606d673fe0d370a1
Gerrit-Change-Number: 5645442
Gerrit-PatchSet: 14
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Mon, 24 Jun 2024 08:58:56 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
open
diffy

chromeperf@appspot.gserviceaccount.com (Gerrit)

unread,
Jun 24, 2024, 5:05:43 AMJun 24
to Michael Lippautz, Omer Katz, AyeAye, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, victorgo...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Message from chrom...@appspot.gserviceaccount.com

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Review
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: I8c6d4cd037c8fb1b521d1a43606d673fe0d370a1
Gerrit-Change-Number: 5645442
Gerrit-PatchSet: 14
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Mon, 24 Jun 2024 09:05:38 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
open
diffy

chromeperf@appspot.gserviceaccount.com (Gerrit)

unread,
Jun 24, 2024, 5:24:15 AMJun 24
to Michael Lippautz, Omer Katz, AyeAye, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, victorgo...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Message from chrom...@appspot.gserviceaccount.com

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Review
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: I8c6d4cd037c8fb1b521d1a43606d673fe0d370a1
Gerrit-Change-Number: 5645442
Gerrit-PatchSet: 15
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Mon, 24 Jun 2024 09:24:09 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
open
diffy

chromeperf@appspot.gserviceaccount.com (Gerrit)

unread,
Jun 24, 2024, 5:25:59 AMJun 24
to Michael Lippautz, Omer Katz, AyeAye, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, victorgo...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Message from chrom...@appspot.gserviceaccount.com

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Review
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: I8c6d4cd037c8fb1b521d1a43606d673fe0d370a1
Gerrit-Change-Number: 5645442
Gerrit-PatchSet: 15
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Mon, 24 Jun 2024 09:25:54 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
open
diffy

chromeperf@appspot.gserviceaccount.com (Gerrit)

unread,
Jun 24, 2024, 5:49:51 AMJun 24
to Michael Lippautz, Omer Katz, AyeAye, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, victorgo...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Message from chrom...@appspot.gserviceaccount.com

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Review
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: I8c6d4cd037c8fb1b521d1a43606d673fe0d370a1
Gerrit-Change-Number: 5645442
Gerrit-PatchSet: 16
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Mon, 24 Jun 2024 09:49:45 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
open
diffy

chromeperf@appspot.gserviceaccount.com (Gerrit)

unread,
Jun 24, 2024, 6:37:35 AMJun 24
to Michael Lippautz, Omer Katz, AyeAye, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, victorgo...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Message from chrom...@appspot.gserviceaccount.com

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Review
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: I8c6d4cd037c8fb1b521d1a43606d673fe0d370a1
Gerrit-Change-Number: 5645442
Gerrit-PatchSet: 16
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Mon, 24 Jun 2024 10:37:29 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
open
diffy

chromeperf@appspot.gserviceaccount.com (Gerrit)

unread,
Jun 24, 2024, 6:44:15 AMJun 24
to Michael Lippautz, Omer Katz, AyeAye, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, victorgo...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Message from chrom...@appspot.gserviceaccount.com

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Review
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: I8c6d4cd037c8fb1b521d1a43606d673fe0d370a1
Gerrit-Change-Number: 5645442
Gerrit-PatchSet: 16
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Mon, 24 Jun 2024 10:44:10 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
Jun 24, 2024, 6:50:00 AMJun 24
to Omer Katz, AyeAye, chrom...@appspot.gserviceaccount.com, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, victorgo...@chromium.org, mlippau...@chromium.org, oilpan-r...@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-Review
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: I8c6d4cd037c8fb1b521d1a43606d673fe0d370a1
Gerrit-Change-Number: 5645442
Gerrit-PatchSet: 16
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Comment-Date: Mon, 24 Jun 2024 10:49:55 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

V8 LUCI CQ (Gerrit)

unread,
Jun 24, 2024, 6:51:23 AMJun 24
to Michael Lippautz, Omer Katz, AyeAye, chrom...@appspot.gserviceaccount.com, Hannes Payer, cbruni...@chromium.org, victorgo...@chromium.org, mlippau...@chromium.org, oilpan-r...@chromium.org, v8-re...@googlegroups.com

V8 LUCI CQ submitted the change with unreviewed changes

Unreviewed changes

13 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: src/heap/base/cached-unordered-map.h
Insertions: 8, Deletions: 1.

@@ -28,9 +28,16 @@
return *last_mapped_;
}

- const auto it = map_.try_emplace(key, Mapped()).first;
+ auto it = map_.find(key);
+ if (it == map_.end()) {
+ auto result = map_.emplace(key, Mapped());
+ DCHECK(result.second);
+ it = result.first;
+ }
+
last_key_ = key;
last_mapped_ = &it->second;
+
return it->second;
}

```

Change information

Commit message:
[cppgc] Sweep based on live bytes on pages

Gardeners: This may cause a slight regression for a feature that
landed behind field trial (V8GCOptimizeSweepForMutator) as a
progression. The overall situation is still a net win once launched.

Not sweeping on allocation can cause memory regressions in case where
there is no progress via tasks as we are effectively getting new
pages. We also need sweeping to return empty pages due to having finalizers.

This CL brings back sweeping on allocation instead of bailing
out depending on the limit. At the same time we introduce per-page
live byte counts which are populated during marking. The sweeper can
then sort pages accordingly and start with pages that have the most
free bytes. This results in lower time spent in sweeping on allocation
as the chance is high to get a large block or almost empty page here.

In future, we can adjust concurrent sweeper to be page agnostic which
should improve this even further.
Change-Id: I8c6d4cd037c8fb1b521d1a43606d673fe0d370a1
Bug: 333981063
Reviewed-by: Omer Katz <omer...@chromium.org>
Commit-Queue: Michael Lippautz <mlip...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#94597}
Files:
  • M BUILD.bazel
  • M BUILD.gn
  • M include/cppgc/internal/api-constants.h
  • A src/heap/base/cached-unordered-map.h
  • M src/heap/concurrent-marking.cc
  • M src/heap/concurrent-marking.h
  • M src/heap/cppgc-js/cpp-heap.cc
  • M src/heap/cppgc-js/unified-heap-marking-visitor.cc
  • M src/heap/cppgc/compactor.cc
  • M src/heap/cppgc/heap-page.h
  • M src/heap/cppgc/marker.cc
  • M src/heap/cppgc/marking-state.cc
  • M src/heap/cppgc/marking-state.h
  • M src/heap/cppgc/marking-verifier.cc
  • M src/heap/cppgc/marking-verifier.h
  • M src/heap/cppgc/marking-visitor.cc
  • M src/heap/cppgc/sweeper.cc
  • M src/heap/cppgc/sweeper.h
  • M test/unittests/heap/cppgc/marking-verifier-unittest.cc
Change size: L
Delta: 19 files changed, 206 insertions(+), 132 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Omer Katz
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: I8c6d4cd037c8fb1b521d1a43606d673fe0d370a1
Gerrit-Change-Number: 5645442
Gerrit-PatchSet: 17
Gerrit-Owner: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-Reviewer: Omer Katz <omer...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages