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

Issue 2930943002: Debug garbage collector does not correctly remove cross-gen garbage (Closed)

Created:
3 years, 6 months ago by danunez
Modified:
3 years, 5 months ago
Reviewers:
rmacnak, siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Modifies the debug garbage collector (CollectAllGarbage()) to correctly remove inter-generational garbage by evacuating all of new space. Adds tests to check if this issue has been correctly resolved. Updates the WeakProperty_PreserveCrossGen test to call for one new and one old space collection instead of CollectAllGarbage(). Otherwise, all weak properties are swept as garbage. DETAILS: ISSUE Specifically, the following arrangements in a heap resulted in garbage surviving a GC. - Dead object in old space pointing to dead object in new space results in the new space object surviving. - A cycle between two dead objects, one in each space, results in the cycle surviving until all objects are in the old space. BUG= R=rmacnak@google.com Committed: https://github.com/dart-lang/sdk/commit/abf40fc8d221530cf589a7d7af11324fed48a823

Patch Set 1 #

Total comments: 5

Patch Set 2 : Evacuate the new space in CollectAllGarbage(). #

Patch Set 3 : Removes an extra space introduced in the last set. #

Total comments: 4

Patch Set 4 : Rewrites Evacuate() to use one Scavenge() #

Total comments: 6

Patch Set 5 : Adds comments to explain changes to Evacuate() and CollectAllGarbage() #

Patch Set 6 : Adds logging from CollectNewSpaceGarbage() to Evacuate() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+264 lines, -12 lines) Patch
M runtime/vm/heap.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/heap.cc View 1 2 3 4 5 2 chunks +19 lines, -1 line 0 comments Download
M runtime/vm/heap_test.cc View 1 2 3 1 chunk +208 lines, -0 lines 0 comments Download
M runtime/vm/object_test.cc View 1 2 3 4 5 4 chunks +8 lines, -4 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/scavenger.h View 1 2 3 4 5 2 chunks +3 lines, -5 lines 0 comments Download
M runtime/vm/scavenger.cc View 1 2 3 4 5 4 chunks +24 lines, -1 line 0 comments Download

Messages

Total messages: 14 (6 generated)
rmacnak
https://codereview.chromium.org/2930943002/diff/1/runtime/vm/gc_marker.cc File runtime/vm/gc_marker.cc (right): https://codereview.chromium.org/2930943002/diff/1/runtime/vm/gc_marker.cc#newcode266 runtime/vm/gc_marker.cc:266: ASSERT(raw_weak->IsOldObject()); Update (visiting new-space weak properties now). https://codereview.chromium.org/2930943002/diff/1/runtime/vm/gc_marker.cc#newcode277 runtime/vm/gc_marker.cc:277: ...
3 years, 6 months ago (2017-06-08 21:23:48 UTC) #2
danunez
On 2017/06/08 21:23:48, rmacnak wrote: > https://codereview.chromium.org/2930943002/diff/1/runtime/vm/gc_marker.cc > File runtime/vm/gc_marker.cc (right): > > https://codereview.chromium.org/2930943002/diff/1/runtime/vm/gc_marker.cc#newcode266 > ...
3 years, 6 months ago (2017-06-08 21:32:15 UTC) #3
danunez
On 2017/06/08 21:32:15, danunez wrote: > On 2017/06/08 21:23:48, rmacnak wrote: > > https://codereview.chromium.org/2930943002/diff/1/runtime/vm/gc_marker.cc > ...
3 years, 6 months ago (2017-06-14 19:50:34 UTC) #4
rmacnak
https://codereview.chromium.org/2930943002/diff/40001/runtime/vm/heap.cc File runtime/vm/heap.cc (right): https://codereview.chromium.org/2930943002/diff/40001/runtime/vm/heap.cc#newcode452 runtime/vm/heap.cc:452: debug_gc_in_progress_ = true; Can this be new_space_.Evacuate(); CollectOldSpaceGarbage(thread, kInvokeApiCallbacks, ...
3 years, 6 months ago (2017-06-19 19:29:00 UTC) #7
danunez
On 2017/06/19 19:29:00, rmacnak wrote: > https://codereview.chromium.org/2930943002/diff/40001/runtime/vm/heap.cc > File runtime/vm/heap.cc (right): > > https://codereview.chromium.org/2930943002/diff/40001/runtime/vm/heap.cc#newcode452 > ...
3 years, 6 months ago (2017-06-19 19:41:24 UTC) #8
rmacnak
LGTM w/ comments Also please update the commit message to clarify that this fixes CollectAllGarbage, ...
3 years, 6 months ago (2017-06-22 21:59:33 UTC) #9
danunez
Expect new patchset soon. https://codereview.chromium.org/2930943002/diff/60001/runtime/vm/heap.cc File runtime/vm/heap.cc (right): https://codereview.chromium.org/2930943002/diff/60001/runtime/vm/heap.cc#newcode447 runtime/vm/heap.cc:447: new_space_.Evacuate(); On 2017/06/22 21:59:33, rmacnak ...
3 years, 6 months ago (2017-06-22 22:07:48 UTC) #10
danunez
3 years, 5 months ago (2017-06-27 21:00:50 UTC) #13
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as
abf40fc8d221530cf589a7d7af11324fed48a823 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698