Revision: 13066
Author: [email protected]
Date: Tue Nov 27 05:18:55 2012
Log: 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
Review URL: https://codereview.chromium.org/11413183
http://code.google.com/p/v8/source/detail?r=13066
Modified:
/branches/bleeding_edge/src/heap.cc
/branches/bleeding_edge/src/mark-compact.h
=======================================
--- /branches/bleeding_edge/src/heap.cc Mon Nov 26 02:23:16 2012
+++ /branches/bleeding_edge/src/heap.cc Tue Nov 27 05:18:55 2012
@@ -615,7 +615,7 @@
}
if (collector == MARK_COMPACTOR &&
- !mark_compact_collector()->abort_incremental_marking_ &&
+ !mark_compact_collector()->abort_incremental_marking() &&
!incremental_marking()->IsStopped() &&
!incremental_marking()->should_hurry() &&
FLAG_incremental_marking_steps) {
@@ -657,10 +657,13 @@
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;
=======================================
--- /branches/bleeding_edge/src/mark-compact.h Thu Nov 8 04:18:11 2012
+++ /branches/bleeding_edge/src/mark-compact.h Tue Nov 27 05:18:55 2012
@@ -657,6 +657,8 @@
void InvalidateCode(Code* code);
void ClearMarkbits();
+
+ bool abort_incremental_marking() const { return
abort_incremental_marking_; }
bool is_compacting() const { return compacting_; }
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev