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

Issue 7617005: Abort incremental marking before GCs when test assumes that an object is collected. (Closed)

Created:
9 years, 4 months ago by Lasse Reichstein
Modified:
9 years, 4 months ago
CC:
v8-dev
Visibility:
Public.

Description

Abort incremental marking before GCs when test assumes that an object is collected. Also port the related bleeding edge r8892 to gc branch. It avoid using shared static variables in threaded tests. TEST=Threaded4 Committed: http://code.google.com/p/v8/source/detail?r=8896

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use CollectAllAvailableGarbage instead. #

Patch Set 3 : Missed two GCs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -55 lines) Patch
M test/cctest/test-api.cc View 1 2 11 chunks +52 lines, -55 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Lasse Reichstein
9 years, 4 months ago (2011-08-11 11:03:08 UTC) #1
Vyacheslav Egorov (Chromium)
LGTM http://codereview.chromium.org/7617005/diff/1/test/cctest/test-api.cc File test/cctest/test-api.cc (right): http://codereview.chromium.org/7617005/diff/1/test/cctest/test-api.cc#newcode402 test/cctest/test-api.cc:402: if (HEAP->incremental_marking()->IsMarking()) { Maybe we should always abort ...
9 years, 4 months ago (2011-08-11 11:37:24 UTC) #2
Lasse Reichstein
9 years, 4 months ago (2011-08-11 12:20:13 UTC) #3
http://codereview.chromium.org/7617005/diff/1/test/cctest/test-api.cc
File test/cctest/test-api.cc (right):

http://codereview.chromium.org/7617005/diff/1/test/cctest/test-api.cc#newcode402
test/cctest/test-api.cc:402: if (HEAP->incremental_marking()->IsMarking()) {
Actaully CollectAllAvailableGarbage does use the kMakeHeapIterableMask flag, so
this call is safe.
On the other hand CollectAllGarbage doesn't do it (and it has "All" in the name
too (which is odd naming - the unqualified CollectAllGarbage collects less than
the qualified CollectAllAvailableGarbage, and "Available" seems odd to use about
garbage which, by definition, isn't reachable)).

I've changed the code to use CollectAllAvailableGarbage instead of
CollectAllGarbage instead of inserting these manual aborts.

Powered by Google App Engine
This is Rietveld 408576698