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

Unified Diff: src/mark-compact.cc

Issue 361983003: Wait for sweeper threads only if we have to. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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') | 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 8846f19bb0dbaeec80192bf9709b3e3f1029cf2c..1de8d255580478adc04496d3f71f3d28a0e6c0a2 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -208,7 +208,7 @@ static void VerifyEvacuation(PagedSpace* space) {
// TODO(hpayer): Bring back VerifyEvacuation for parallel-concurrently
// swept pages.
if ((FLAG_concurrent_sweeping || FLAG_parallel_sweeping) &&
- space->was_swept_conservatively()) return;
+ !space->is_iterable()) return;
PageIterator it(space);
while (it.has_next()) {
@@ -647,8 +647,9 @@ bool MarkCompactCollector::AreSweeperThreadsActivated() {
}
-bool MarkCompactCollector::IsConcurrentSweepingInProgress() {
- return sweeping_pending_;
+bool MarkCompactCollector::IsConcurrentSweepingInProgress(PagedSpace* space) {
+ return (space == NULL || space->is_swept_concurrently()) &&
+ sweeping_pending_;
}
@@ -2044,7 +2045,7 @@ int MarkCompactCollector::DiscoverAndEvacuateBlackObjectsOnPage(
static void DiscoverGreyObjectsInSpace(Heap* heap,
MarkingDeque* marking_deque,
PagedSpace* space) {
- if (!space->was_swept_conservatively()) {
+ if (space->is_iterable()) {
HeapObjectIterator it(space);
DiscoverGreyObjectsWithIterator(heap, marking_deque, &it);
} else {
@@ -4078,9 +4079,8 @@ void MarkCompactCollector::SweepInParallel(PagedSpace* space) {
void MarkCompactCollector::SweepSpace(PagedSpace* space, SweeperType sweeper) {
- space->set_was_swept_conservatively(sweeper == CONSERVATIVE ||
- sweeper == PARALLEL_CONSERVATIVE ||
- sweeper == CONCURRENT_CONSERVATIVE);
+ space->set_is_iterable(sweeper == PRECISE);
+ space->set_is_swept_concurrently(sweeper == CONCURRENT_CONSERVATIVE);
space->ClearStats();
// We defensively initialize end_of_unswept_pages_ here with the first page
« no previous file with comments | « src/mark-compact.h ('k') | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698