Revision: 22514
Author: [email protected]
Date: Mon Jul 21 19:24:02 2014 UTC
Log: Set the state of a swept page after being done with sweeping.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/408843003
http://code.google.com/p/v8/source/detail?r=22514
Modified:
/branches/bleeding_edge/src/mark-compact.cc
=======================================
--- /branches/bleeding_edge/src/mark-compact.cc Mon Jul 21 15:12:19 2014 UTC
+++ /branches/bleeding_edge/src/mark-compact.cc Mon Jul 21 19:24:02 2014 UTC
@@ -3266,12 +3266,6 @@
if (FLAG_print_cumulative_gc_stat) {
start_time = base::OS::TimeCurrentMillis();
}
-
- if (parallelism == MarkCompactCollector::SWEEP_IN_PARALLEL) {
- p->set_parallel_sweeping(MemoryChunk::SWEEPING_FINALIZE);
- } else {
- p->MarkSweptPrecisely();
- }
Address free_start = p->area_start();
ASSERT(reinterpret_cast<intptr_t>(free_start) % (32 * kPointerSize) ==
0);
@@ -3346,6 +3340,14 @@
if (FLAG_print_cumulative_gc_stat) {
space->heap()->AddSweepingTime(base::OS::TimeCurrentMillis() -
start_time);
}
+
+ if (parallelism == MarkCompactCollector::SWEEP_IN_PARALLEL) {
+ // When concurrent sweeping is active, the page will be marked after
+ // sweeping by the main thread.
+ p->set_parallel_sweeping(MemoryChunk::SWEEPING_FINALIZE);
+ } else {
+ p->MarkSweptPrecisely();
+ }
return
FreeList::GuaranteedAllocatable(static_cast<int>(max_freed_bytes));
}
@@ -3998,14 +4000,6 @@
free_list != NULL) ||
(mode == MarkCompactCollector::SWEEP_ON_MAIN_THREAD &&
free_list == NULL));
-
- // When parallel sweeping is active, the page will be marked after
- // sweeping by the main thread.
- if (mode == MarkCompactCollector::SWEEP_IN_PARALLEL) {
- p->set_parallel_sweeping(MemoryChunk::SWEEPING_FINALIZE);
- } else {
- p->MarkSweptConservatively();
- }
intptr_t freed_bytes = 0;
intptr_t max_freed_bytes = 0;
@@ -4027,6 +4021,13 @@
static_cast<int>(size));
max_freed_bytes = Max(freed_bytes, max_freed_bytes);
ASSERT_EQ(0, p->LiveBytes());
+ if (mode == MarkCompactCollector::SWEEP_IN_PARALLEL) {
+ // When concurrent sweeping is active, the page will be marked after
+ // sweeping by the main thread.
+ p->set_parallel_sweeping(MemoryChunk::SWEEPING_FINALIZE);
+ } else {
+ p->MarkSweptConservatively();
+ }
return
FreeList::GuaranteedAllocatable(static_cast<int>(max_freed_bytes));
}
@@ -4084,6 +4085,13 @@
}
p->ResetLiveBytes();
+ if (mode == MarkCompactCollector::SWEEP_IN_PARALLEL) {
+ // When concurrent sweeping is active, the page will be marked after
+ // sweeping by the main thread.
+ p->set_parallel_sweeping(MemoryChunk::SWEEPING_FINALIZE);
+ } else {
+ p->MarkSweptConservatively();
+ }
return
FreeList::GuaranteedAllocatable(static_cast<int>(max_freed_bytes));
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.