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

Unified Diff: src/mark-compact.cc

Issue 12184016: Set unswept free bytes for concurent sweeper. (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 | « no previous file | src/spaces.h » ('j') | 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 6acf5f2599a5b40941ebcf45fcb377664b330214..47a66a8c1055b25eb53701ae721ba00727621292 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -557,6 +557,8 @@ void MarkCompactCollector::WaitUntilSweepingCompleted() {
sweeping_pending_ = false;
StealMemoryFromSweeperThreads(heap()->paged_space(OLD_DATA_SPACE));
StealMemoryFromSweeperThreads(heap()->paged_space(OLD_POINTER_SPACE));
+ heap()->paged_space(OLD_DATA_SPACE)->ResetUnsweptFreeBytes();
+ heap()->paged_space(OLD_POINTER_SPACE)->ResetUnsweptFreeBytes();
}
}
@@ -567,6 +569,8 @@ intptr_t MarkCompactCollector::
for (int i = 0; i < FLAG_sweeper_threads; i++) {
freed_bytes += heap()->isolate()->sweeper_threads()[i]->StealMemory(space);
}
+ space->AddToAccountingStats(freed_bytes);
+ space->DecrementUnsweptFreeBytes(freed_bytes);
return freed_bytes;
}
@@ -3843,6 +3847,7 @@ void MarkCompactCollector::SweepSpace(PagedSpace* space, SweeperType sweeper) {
reinterpret_cast<intptr_t>(p));
}
p->set_parallel_sweeping(1);
+ space->IncreaseUnsweptFreeBytes(p);
break;
}
case PRECISE: {
« no previous file with comments | « no previous file | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698