Commit 5f1a4e3f authored by hpayer@chromium.org's avatar hpayer@chromium.org

Fix verify heap problem when parallel sweeping is enabled.

BUG=

Review URL: https://codereview.chromium.org/12260004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13651 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent ae37a513
...@@ -3722,7 +3722,8 @@ void MarkCompactCollector::SweepInParallel(PagedSpace* space, ...@@ -3722,7 +3722,8 @@ void MarkCompactCollector::SweepInParallel(PagedSpace* space,
void MarkCompactCollector::SweepSpace(PagedSpace* space, SweeperType sweeper) { void MarkCompactCollector::SweepSpace(PagedSpace* space, SweeperType sweeper) {
space->set_was_swept_conservatively(sweeper == CONSERVATIVE || space->set_was_swept_conservatively(sweeper == CONSERVATIVE ||
sweeper == LAZY_CONSERVATIVE); sweeper == LAZY_CONSERVATIVE ||
sweeper == PARALLEL_CONSERVATIVE);
space->ClearStats(); space->ClearStats();
PageIterator it(space); PageIterator it(space);
...@@ -3841,9 +3842,9 @@ void MarkCompactCollector::SweepSpaces() { ...@@ -3841,9 +3842,9 @@ void MarkCompactCollector::SweepSpaces() {
#endif #endif
SweeperType how_to_sweep = SweeperType how_to_sweep =
FLAG_lazy_sweeping ? LAZY_CONSERVATIVE : CONSERVATIVE; FLAG_lazy_sweeping ? LAZY_CONSERVATIVE : CONSERVATIVE;
if (AreSweeperThreadsActivated()) how_to_sweep = PARALLEL_CONSERVATIVE;
if (FLAG_expose_gc) how_to_sweep = CONSERVATIVE; if (FLAG_expose_gc) how_to_sweep = CONSERVATIVE;
if (sweep_precisely_) how_to_sweep = PRECISE; if (sweep_precisely_) how_to_sweep = PRECISE;
if (AreSweeperThreadsActivated()) how_to_sweep = PARALLEL_CONSERVATIVE;
// Noncompacting collections simply sweep the spaces to clear the mark // Noncompacting collections simply sweep the spaces to clear the mark
// bits and free the nonlive blocks (for old and map spaces). We sweep // bits and free the nonlive blocks (for old and map spaces). We sweep
// the map space last because freeing non-live maps overwrites them and // the map space last because freeing non-live maps overwrites them and
...@@ -3860,7 +3861,7 @@ void MarkCompactCollector::SweepSpaces() { ...@@ -3860,7 +3861,7 @@ void MarkCompactCollector::SweepSpaces() {
EvacuateNewSpaceAndCandidates(); EvacuateNewSpaceAndCandidates();
if (AreSweeperThreadsActivated()) { if (how_to_sweep == PARALLEL_CONSERVATIVE) {
// TODO(hpayer): The starting of the sweeper threads should be after // TODO(hpayer): The starting of the sweeper threads should be after
// SweepSpace old data space. // SweepSpace old data space.
StartSweeperThreads(); StartSweeperThreads();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment