Reviewers: Toon Verwaest,
Description:
Fix incremental marking to be off during heap snapshots.
The heap snapshot generator uses the UnreachableObjectsFilter which in
turn messes with marking bits. This requires incremental marking to be
turned off while the snapshot is being generated.
[email protected]
TEST=cctest/test-heap-profiler --stress-compaction
Please review this at https://codereview.chromium.org/11413183/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/heap.cc
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index
c394a2c60b7a4177e43691c211826112118fe8b0..ece80f78179d5fa03802273165a3d7d18e9d90d9
100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -657,10 +657,13 @@ bool Heap::CollectGarbage(AllocationSpace space,
GarbageCollectionEpilogue();
}
- if (incremental_marking()->IsStopped()) {
- if (incremental_marking()->WorthActivating() &&
NextGCIsLikelyToBeFull()) {
- incremental_marking()->Start();
- }
+ // Start incremental marking for the next cycle. The heap snapshot
+ // generator needs incremental marking to stay off after it aborted.
+ if (!mark_compact_collector()->abort_incremental_marking_ &&
+ incremental_marking()->IsStopped() &&
+ incremental_marking()->WorthActivating() &&
+ NextGCIsLikelyToBeFull()) {
+ incremental_marking()->Start();
}
return next_gc_likely_to_collect_more;
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev