Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Issue 1577853007: [heap] Parallel newspace evacuation, semispace copy, and compaction \o/ (Closed)

Created:
4 years, 11 months ago by Michael Lippautz
Modified:
4 years, 11 months ago
CC:
v8-reviews_googlegroups.com, Hannes Payer (out of office), ulan
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[heap] Parallel newspace evacuation, semispace copy, and compaction \o/ All parallelism can be turned off using --predictable, or --noparallel-compaction. This patch completely parallelizes - semispace copy: from space -> to space (within newspace) - newspace evacuation: newspace -> oldspace - oldspace compaction: oldspace -> oldspace Previously newspace has been handled sequentially (semispace copy, newspace evacuation) before compacting oldspace in parallel. However, on a high level there are no dependencies between those two actions, hence we parallelize them altogether. We base the number of evacuation tasks on the overall set of to-be-processed pages (newspace + oldspace compaction pages). Some low-level details: - The hard cap on number of tasks has been lifted - We cache store buffer entries locally before merging them back into the global StoreBuffer in a finalization phase. - We cache AllocationSite operations locally before merging them back into the global pretenuring storage in a finalization phase. - AllocationSite might be compacted while they would be needed for newspace evacuation. To mitigate any problems we defer checking allocation sites for newspace till merging locally buffered data. CQ_EXTRA_TRYBOTS=tryserver.v8:v8_linux_arm64_gc_stress_dbg,v8_linux_gc_stress_dbg,v8_mac_gc_stress_dbg,v8_linux64_asan_rel,v8_linux64_tsan_rel,v8_mac64_asan_rel BUG=chromium:524425 LOG=N R=hpayer@chromium.org, ulan@chromium.org Committed: https://crrev.com/8f0fd8c0370ae8c5aab56491b879d7e30c329062 Cr-Commit-Position: refs/heads/master@{#33523}

Patch Set 1 : #

Patch Set 2 : Fix case where AlloctionSites are compacted before using them for newspace pages #

Patch Set 3 : StoreBuffer compaction uses local hashmap instead of counter on page #

Patch Set 4 : Add additional check for scan on scavenge page in store buffer and remove unneeded synchronization #

Patch Set 5 : Fix compilation and NewSpace.top() handling for FindMemento #

Patch Set 6 : Add scalable store buffer based on local buffering #

Patch Set 7 : Various non-functional changes #

Total comments: 15

Patch Set 8 : Rebase (2 changes factored out) and addressed comments #

Total comments: 8

Patch Set 9 : Addressed comments #

Patch Set 10 : Refactoring #

Total comments: 16

Patch Set 11 : Addressed comments #

Patch Set 12 : Rebase + fix compilation #

Total comments: 21

Patch Set 13 : Addressed comments #

Patch Set 14 : Addressed comment #

Patch Set 15 : Rebase and fix compilation #

Patch Set 16 : Disable concurrent sweeping for test expecting # of pages released #

Unified diffs Side-by-side diffs Delta from patch set Stats (+463 lines, -305 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M src/globals.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +8 lines, -0 lines 0 comments Download
M src/heap/array-buffer-tracker.h View 2 chunks +2 lines, -0 lines 0 comments Download
M src/heap/array-buffer-tracker.cc View 2 chunks +3 lines, -0 lines 0 comments Download
M src/heap/heap.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +9 lines, -6 lines 0 comments Download
M src/heap/heap.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +9 lines, -7 lines 0 comments Download
M src/heap/heap-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +47 lines, -34 lines 0 comments Download
M src/heap/mark-compact.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +11 lines, -17 lines 0 comments Download
M src/heap/mark-compact.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 29 chunks +272 lines, -215 lines 0 comments Download
M src/heap/spaces.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +1 line, -15 lines 0 comments Download
M src/heap/store-buffer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +33 lines, -4 lines 0 comments Download
M src/heap/store-buffer-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +16 lines, -6 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -1 line 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -0 lines 0 comments Download
A src/utils-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +37 lines, -0 lines 0 comments Download
M test/cctest/heap/test-heap.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +7 lines, -0 lines 0 comments Download
M tools/gyp/v8.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 75 (45 generated)
Michael Lippautz
Please take a look! The following changes are in principle dependencies that could independently land ...
4 years, 11 months ago (2016-01-14 19:51:55 UTC) #10
ulan
I looked at everything except allocation site changes. Looks good. Few comments: https://codereview.chromium.org/1577853007/diff/220001/src/heap/mark-compact.cc File src/heap/mark-compact.cc ...
4 years, 11 months ago (2016-01-15 10:44:43 UTC) #14
Michael Lippautz
PTAL. Addressed all comments and rebased as 2 trivial changes landed independently: - https://codereview.chromium.org/1585843010/ - ...
4 years, 11 months ago (2016-01-15 13:09:53 UTC) #17
Michael Lippautz
Forgot to mention: We discussed offline that an Evacuator, that bundles all evacuation logic, could ...
4 years, 11 months ago (2016-01-15 13:10:37 UTC) #18
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1577853007/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1577853007/340001
4 years, 11 months ago (2016-01-18 08:33:26 UTC) #27
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-18 09:07:28 UTC) #29
Hannes Payer (out of office)
First round of comments. https://codereview.chromium.org/1577853007/diff/340001/src/heap/heap-inl.h File src/heap/heap-inl.h (right): https://codereview.chromium.org/1577853007/diff/340001/src/heap/heap-inl.h#newcode471 src/heap/heap-inl.h:471: AllocationMemento* Heap::FindAllocationMemento(HeapObject* object) { As ...
4 years, 11 months ago (2016-01-18 11:46:34 UTC) #31
Michael Lippautz
PTAL This update includes the refactoring that I was talking about. It properly encapsulates all ...
4 years, 11 months ago (2016-01-19 14:56:52 UTC) #33
Hannes Payer (out of office)
https://codereview.chromium.org/1577853007/diff/400001/src/heap/heap-inl.h File src/heap/heap-inl.h (right): https://codereview.chromium.org/1577853007/diff/400001/src/heap/heap-inl.h#newcode471 src/heap/heap-inl.h:471: template <int find_memento_mode> s/int find_memento_mode/Heap:FindMementoMode mode/ https://codereview.chromium.org/1577853007/diff/400001/src/heap/heap-inl.h#newcode497 src/heap/heap-inl.h:497: UNREACHABLE(); ...
4 years, 11 months ago (2016-01-20 13:19:39 UTC) #35
Michael Lippautz
Addressed comments. The sweeper change is a dependency that needs to land before, as otherwise ...
4 years, 11 months ago (2016-01-21 10:00:08 UTC) #39
Hannes Payer (out of office)
Just nits. LGTM. Awesome! https://codereview.chromium.org/1577853007/diff/500001/src/heap/heap-inl.h File src/heap/heap-inl.h (right): https://codereview.chromium.org/1577853007/diff/500001/src/heap/heap-inl.h#newcode520 src/heap/heap-inl.h:520: uint32_t Heap::ObjectHash(Address address) { What ...
4 years, 11 months ago (2016-01-25 16:04:14 UTC) #40
Michael Lippautz
https://codereview.chromium.org/1577853007/diff/500001/src/heap/heap-inl.h File src/heap/heap-inl.h (right): https://codereview.chromium.org/1577853007/diff/500001/src/heap/heap-inl.h#newcode520 src/heap/heap-inl.h:520: uint32_t Heap::ObjectHash(Address address) { On 2016/01/25 16:04:13, Hannes Payer ...
4 years, 11 months ago (2016-01-25 16:26:15 UTC) #41
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1577853007/520001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1577853007/520001
4 years, 11 months ago (2016-01-25 16:36:31 UTC) #43
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_arm64_gc_stress_dbg on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_arm64_gc_stress_dbg/builds/40) v8_linux_gcc_compile_rel on ...
4 years, 11 months ago (2016-01-25 16:37:31 UTC) #45
Hannes Payer (out of office)
https://codereview.chromium.org/1577853007/diff/500001/src/heap/mark-compact.cc File src/heap/mark-compact.cc (right): https://codereview.chromium.org/1577853007/diff/500001/src/heap/mark-compact.cc#newcode3161 src/heap/mark-compact.cc:3161: success = collector_->VisitLiveObjects(p, visitor, kClearMarkbits); On 2016/01/25 16:26:14, Michael ...
4 years, 11 months ago (2016-01-25 17:07:23 UTC) #46
Michael Lippautz
https://codereview.chromium.org/1577853007/diff/500001/src/heap/mark-compact.cc File src/heap/mark-compact.cc (right): https://codereview.chromium.org/1577853007/diff/500001/src/heap/mark-compact.cc#newcode3178 src/heap/mark-compact.cc:3178: return !aborted; On 2016/01/25 17:07:23, Hannes Payer wrote: > ...
4 years, 11 months ago (2016-01-25 17:10:55 UTC) #47
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1577853007/560001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1577853007/560001
4 years, 11 months ago (2016-01-25 17:12:40 UTC) #49
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_gc_stress_dbg on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_gc_stress_dbg/builds/47)
4 years, 11 months ago (2016-01-25 17:15:50 UTC) #51
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1577853007/580001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1577853007/580001
4 years, 11 months ago (2016-01-25 17:21:16 UTC) #54
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_asan_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_asan_rel/builds/12769)
4 years, 11 months ago (2016-01-25 17:33:04 UTC) #56
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1577853007/600001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1577853007/600001
4 years, 11 months ago (2016-01-25 17:47:01 UTC) #59
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_avx2_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel/builds/9171)
4 years, 11 months ago (2016-01-25 18:03:11 UTC) #61
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1577853007/620001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1577853007/620001
4 years, 11 months ago (2016-01-25 18:12:00 UTC) #63
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-25 19:31:10 UTC) #65
ulan
LGTM!
4 years, 11 months ago (2016-01-26 14:07:55 UTC) #66
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1577853007/620001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1577853007/620001
4 years, 11 months ago (2016-01-26 15:06:28 UTC) #69
commit-bot: I haz the power
Committed patchset #16 (id:620001)
4 years, 11 months ago (2016-01-26 15:08:16 UTC) #71
commit-bot: I haz the power
Patchset 16 (id:??) landed as https://crrev.com/8f0fd8c0370ae8c5aab56491b879d7e30c329062 Cr-Commit-Position: refs/heads/master@{#33523}
4 years, 11 months ago (2016-01-26 15:08:41 UTC) #73
Michael Achenbach
https://build.chromium.org/p/chromium.webrtc/builders/Mac%20Tester/builds/49664/steps/browser_tests/logs/stdio # # Fatal error in ../../v8/src/heap/heap.cc, line 575 # Check failed: found_count > 0 ...
4 years, 11 months ago (2016-01-27 09:06:01 UTC) #74
Michael Achenbach
4 years, 11 months ago (2016-01-27 09:11:13 UTC) #75
Message was sent while issue was closed.
A revert of this CL (patchset #16 id:620001) has been created in
https://codereview.chromium.org/1643473002/ by machenbach@chromium.org.

The reason for reverting is: [Sheriff] Leads to crashes on all webrtc chromium
testers, e.g.:
https://build.chromium.org/p/chromium.webrtc/builders/Mac%20Tester/builds/49664.

Powered by Google App Engine
This is Rietveld 408576698