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

Issue 2005173003: Immediatelly promote marked objects (Closed)

Created:
4 years, 7 months ago by Marcel Hlopko
Modified:
4 years, 6 months ago
CC:
ulan, v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Immediately promote marked objects during scavenge It happens that a scavenger runs during incremental marking. Currently scavenger does not care about MarkCompact's mark bits. When an object is alive and marked, and at least one scavenge happens during incremental marking, the object will be copied once to the other semispace in the new_space, and then once to the old_space. For surviving objects this is useless extra work. In our current attempts (https://codereview.chromium.org/1988623002) to ensure marked objects are scavenged, all marked objects will survive therefore there will be many objects which will be uselessly copied. This cl modifies our promotion logic so when incremental marking is in progress, and the object is marked, we promote it unconditionally. BUG= LOG=no Committed: https://crrev.com/dc78e0d4d7f8e67d99165ee4fc5cc118e1be2a9f Cr-Commit-Position: refs/heads/master@{#36643}

Patch Set 1 #

Patch Set 2 : Polish #

Total comments: 1

Patch Set 3 : Rewrite using PromotionMode #

Total comments: 1

Patch Set 4 : Fix CheckAndScavengeObject, cleanup #

Patch Set 5 : Do not compute current promotion mode on every iteration #

Total comments: 2

Patch Set 6 : Templatize PromotionMode #

Patch Set 7 : Rebase master #

Total comments: 2

Patch Set 8 : Remove FORCE_PROMOTION #

Total comments: 4

Patch Set 9 : Detemplatize Scavenger::Scavenge and friends, add tests #

Total comments: 2

Patch Set 10 : Address comments #

Patch Set 11 : Cleanup #

Patch Set 12 : Whitespace fix #

Patch Set 13 : Fix test #

Total comments: 3

Patch Set 14 : Should concentrate more #

Patch Set 15 : Really should concentrate more #

Unified diffs Side-by-side diffs Delta from patch set Stats (+156 lines, -113 lines) Patch
M src/heap/heap.h View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -4 lines 0 comments Download
M src/heap/heap.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 chunks +25 lines, -13 lines 0 comments Download
M src/heap/heap-inl.h View 1 2 3 4 5 6 7 8 1 chunk +17 lines, -1 line 0 comments Download
M src/heap/mark-compact.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/heap/scavenger.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +7 lines, -10 lines 0 comments Download
M src/heap/scavenger.cc View 1 2 3 4 5 6 7 8 9 10 11 12 9 chunks +51 lines, -73 lines 0 comments Download
M src/heap/scavenger-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +10 lines, -11 lines 0 comments Download
M test/cctest/heap/test-heap.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +38 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (8 generated)
Marcel Hlopko
Ptal.
4 years, 7 months ago (2016-05-24 10:55:04 UTC) #5
Michael Lippautz
Can we get a cctest for this one? https://codereview.chromium.org/2005173003/diff/20001/src/heap/heap-inl.h File src/heap/heap-inl.h (right): https://codereview.chromium.org/2005173003/diff/20001/src/heap/heap-inl.h#newcode401 src/heap/heap-inl.h:401: if ...
4 years, 7 months ago (2016-05-24 11:54:51 UTC) #6
Marcel Hlopko
As discussed offline, I've rewritten the code to use PromotionMode and runtime arguments. The performance ...
4 years, 7 months ago (2016-05-24 12:47:42 UTC) #7
ulan
Looking good. https://codereview.chromium.org/2005173003/diff/40001/src/heap/scavenger-inl.h File src/heap/scavenger-inl.h (right): https://codereview.chromium.org/2005173003/diff/40001/src/heap/scavenger-inl.h#newcode42 src/heap/scavenger-inl.h:42: Heap* heap, Address slot_address, PromotionMode promotion_mode) { ...
4 years, 7 months ago (2016-05-24 16:41:59 UTC) #9
Marcel Hlopko
I addressed the comments. Ptaal :)
4 years, 7 months ago (2016-05-24 17:16:13 UTC) #10
Hannes Payer (out of office)
I like it. Just one nit. Moreover, could you run the try perf jobs? tools/try_perf.py ...
4 years, 7 months ago (2016-05-25 05:35:46 UTC) #11
ulan
https://codereview.chromium.org/2005173003/diff/80001/src/heap/heap-inl.h File src/heap/heap-inl.h (right): https://codereview.chromium.org/2005173003/diff/80001/src/heap/heap-inl.h#newcode404 src/heap/heap-inl.h:404: bool Heap::ShouldBePromoted(Address old_address, int object_size, On 2016/05/25 05:35:46, Hannes ...
4 years, 7 months ago (2016-05-25 08:24:09 UTC) #12
Marcel Hlopko
On 2016/05/25 at 08:24:09, ulan wrote: > https://codereview.chromium.org/2005173003/diff/80001/src/heap/heap-inl.h > File src/heap/heap-inl.h (right): > > https://codereview.chromium.org/2005173003/diff/80001/src/heap/heap-inl.h#newcode404 ...
4 years, 7 months ago (2016-05-25 08:30:47 UTC) #13
Hannes Payer (out of office)
On 2016/05/25 08:30:47, Marcel Hlopko wrote: > On 2016/05/25 at 08:24:09, ulan wrote: > > ...
4 years, 7 months ago (2016-05-25 19:19:17 UTC) #14
Marcel Hlopko
I now use PromotionMode as template parameter. Wdyt?
4 years, 6 months ago (2016-05-30 13:54:12 UTC) #15
ulan
https://codereview.chromium.org/2005173003/diff/120001/src/heap/heap.h File src/heap/heap.h (right): https://codereview.chromium.org/2005173003/diff/120001/src/heap/heap.h#newcode779 src/heap/heap.h:779: inline PromotionMode CurrentPromotionMode(); Not used anymore? https://codereview.chromium.org/2005173003/diff/120001/src/heap/scavenger-inl.h File src/heap/scavenger-inl.h ...
4 years, 6 months ago (2016-05-30 14:07:28 UTC) #16
Marcel Hlopko
Uploaded cl with FORCE_PROMOTION removed. Still, I'm worried about the duplicity Ulan found: Scavenger::SelectScavengingVisitorsTable tests ...
4 years, 6 months ago (2016-05-30 14:41:29 UTC) #17
ulan
A test that checks promotion during incremental marking would catch the discrepancy between the visitor ...
4 years, 6 months ago (2016-05-30 16:09:06 UTC) #18
Marcel Hlopko
Added tests, addressed comments. Ptal :)
4 years, 6 months ago (2016-05-31 05:45:04 UTC) #19
ulan
https://codereview.chromium.org/2005173003/diff/160001/src/heap/scavenger-inl.h File src/heap/scavenger-inl.h (right): https://codereview.chromium.org/2005173003/diff/160001/src/heap/scavenger-inl.h#newcode42 src/heap/scavenger-inl.h:42: template <PromotionMode promotion_mode> promotion_mode is not used in this ...
4 years, 6 months ago (2016-06-01 09:09:40 UTC) #20
Marcel Hlopko
Addresssed comments. https://codereview.chromium.org/2005173003/diff/160001/src/heap/scavenger-inl.h File src/heap/scavenger-inl.h (right): https://codereview.chromium.org/2005173003/diff/160001/src/heap/scavenger-inl.h#newcode42 src/heap/scavenger-inl.h:42: template <PromotionMode promotion_mode> Aah sorry for not ...
4 years, 6 months ago (2016-06-01 09:19:50 UTC) #21
Marcel Hlopko
Another attempt on cleaning up my mess :) Ptal :)
4 years, 6 months ago (2016-06-01 09:42:48 UTC) #22
ulan
LGTM with two comments. https://codereview.chromium.org/2005173003/diff/240001/src/heap/heap.cc File src/heap/heap.cc (right): https://codereview.chromium.org/2005173003/diff/240001/src/heap/heap.cc#newcode1674 src/heap/heap.cc:1674: this, [this, promotion_mode](Address addr) { ...
4 years, 6 months ago (2016-06-01 11:53:35 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2005173003/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2005173003/280001
4 years, 6 months ago (2016-06-01 12:04:01 UTC) #26
commit-bot: I haz the power
Committed patchset #15 (id:280001)
4 years, 6 months ago (2016-06-01 12:32:13 UTC) #27
commit-bot: I haz the power
4 years, 6 months ago (2016-06-01 12:32:28 UTC) #29
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/dc78e0d4d7f8e67d99165ee4fc5cc118e1be2a9f
Cr-Commit-Position: refs/heads/master@{#36643}

Powered by Google App Engine
This is Rietveld 408576698