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

Unified Diff: src/mark-compact.cc

Issue 12082101: Release evacuation candidates after parallel sweeper threads completed. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mark-compact.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index 5f22565fb9268a21bb5e548c9a74c8ed77067d82..a3dda72af2b7241cb700870869def9d215c9d36a 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -541,6 +541,7 @@ void MarkCompactCollector::WaitUntilSweepingCompleted() {
heap()->isolate()->sweeper_threads()[i]->WaitForSweeperThread();
}
sweeping_pending_ = false;
+ ReleaseEvacuationCandidates();
StealMemoryFromSweeperThreads(heap()->paged_space(OLD_DATA_SPACE));
StealMemoryFromSweeperThreads(heap()->paged_space(OLD_POINTER_SPACE));
heap()->FreeQueuedChunks();
@@ -3280,6 +3281,11 @@ void MarkCompactCollector::EvacuateNewSpaceAndCandidates() {
slots_buffer_allocator_.DeallocateChain(&migration_slots_buffer_);
ASSERT(migration_slots_buffer_ == NULL);
+}
+
+
+void MarkCompactCollector::ReleaseEvacuationCandidates() {
+ int npages = evacuation_candidates_.length();
for (int i = 0; i < npages; i++) {
Page* p = evacuation_candidates_[i];
if (!p->IsEvacuationCandidate()) continue;
@@ -3877,6 +3883,10 @@ void MarkCompactCollector::SweepSpaces() {
// Deallocate unmarked objects and clear marked bits for marked objects.
heap_->lo_space()->FreeUnmarkedObjects();
+
+ if (!AreSweeperThreadsActivated()) {
Michael Starzinger 2013/02/20 18:20:07 ... but called down here at this call-site. Also I
Hannes Payer (out of office) 2013/02/21 12:05:17 The right condition is "if (!FLAG_concurrent_sweep
+ ReleaseEvacuationCandidates();
+ }
}
« no previous file with comments | « src/mark-compact.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698