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

Issue 1988623002: Ensure black and gray objects are kept around by scavenger (Closed)

Created:
4 years, 7 months ago by Marcel Hlopko
Modified:
4 years, 6 months ago
CC:
Hannes Payer (out of office), 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

Ensure black and gray objects are kept around by scavenger Currently, scavenger can collect objects marked by MarkCompact as black or grey. For black objects it does no postprocessing, just collects them. For grey objects scavenger removes dead objects from the marking queue (while updating old pointers to forwarding pointers in the queue). This cl ensures that black and grey objects are kept alive by the scavenger. This is an expected invariant, very much worth having. As multiple scavenges usually run during single incremental marking, which would copy objects once to the other semispace, and then once to the old space, we promote objects immediately. LOG=no

Patch Set 1 : Cleanup unreachable branch in IncrementalMarking #

Patch Set 2 : Do not remove if branch in IncrementalMarking #

Patch Set 3 : Print duration on --print_nvp #

Patch Set 4 : Clear tracing marks after transfer during scavenge #

Patch Set 5 : Git cl format #

Patch Set 6 : Only copy marked objects when marking is in progress #

Patch Set 7 : Fix dcheck #

Patch Set 8 : Fix for black pages #

Total comments: 6

Patch Set 9 : Address comments #

Patch Set 10 : Cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+163 lines, -121 lines) Patch
M src/heap/gc-tracer.h View 1 2 3 4 5 6 7 8 9 1 chunk +49 lines, -48 lines 0 comments Download
M src/heap/gc-tracer.cc View 1 2 3 4 5 6 7 8 9 1 chunk +70 lines, -68 lines 0 comments Download
M src/heap/heap.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M src/heap/heap.cc View 1 2 3 4 5 6 7 8 9 3 chunks +26 lines, -0 lines 0 comments Download
M src/heap/incremental-marking.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M src/heap/mark-compact.h View 1 2 3 4 5 6 7 8 9 1 chunk +10 lines, -3 lines 0 comments Download
M src/heap/spaces.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (10 generated)
Marcel Hlopko
Ptal. This cl can cause performance regression (we copy more stuff during scavenge) what is ...
4 years, 7 months ago (2016-05-17 10:39:31 UTC) #2
Marcel Hlopko
Removing unreachable branch in IncrementalMarking. Can the remaining branch be reached?
4 years, 7 months ago (2016-05-17 10:46:01 UTC) #7
Marcel Hlopko
So the if branch removal was too ambitious, reverting.
4 years, 7 months ago (2016-05-17 11:40:15 UTC) #8
Marcel Hlopko
Some numbers to consider. On my machine the reviving phase alone makes for 0.06ms on ...
4 years, 7 months ago (2016-05-17 17:32:11 UTC) #9
Marcel Hlopko
Added printing using --print_nvp
4 years, 7 months ago (2016-05-17 17:38:35 UTC) #10
Hannes Payer (out of office)
Looking good, just nits. Let's look at perf numbers. https://codereview.chromium.org/1988623002/diff/220001/src/heap/heap.cc File src/heap/heap.cc (right): https://codereview.chromium.org/1988623002/diff/220001/src/heap/heap.cc#newcode1699 src/heap/heap.cc:1699: ...
4 years, 7 months ago (2016-05-20 07:34:41 UTC) #13
Marcel Hlopko
4 years, 7 months ago (2016-05-20 14:31:41 UTC) #15
Let's discuss tradeoffs offline on Monday.

https://codereview.chromium.org/1988623002/diff/220001/src/heap/heap.cc
File src/heap/heap.cc (right):

https://codereview.chromium.org/1988623002/diff/220001/src/heap/heap.cc#newco...
src/heap/heap.cc:1699: // Copy objects marked black or grey by MarkCompact
collector.
Done.

https://codereview.chromium.org/1988623002/diff/220001/src/heap/heap.h
File src/heap/heap.h (right):

https://codereview.chromium.org/1988623002/diff/220001/src/heap/heap.h#newcod...
src/heap/heap.h:1075: void IterateMarkedForScavenger(ObjectVisitor* v);
Done.

https://codereview.chromium.org/1988623002/diff/220001/src/heap/mark-compact.h
File src/heap/mark-compact.h (right):

https://codereview.chromium.org/1988623002/diff/220001/src/heap/mark-compact....
src/heap/mark-compact.h:160: // Returns true if the transferred color is black.
Done.

Powered by Google App Engine
This is Rietveld 408576698