Revision: 10616
Author: [email protected]
Date: Tue Feb 7 00:51:47 2012
Log: Enable non-incremental code compaction.
It is intended to bring memory usage down on idle notifications.
[email protected]
BUG=v8:1726
Review URL: https://chromiumcodereview.appspot.com/9323079
http://code.google.com/p/v8/source/detail?r=10616
Modified:
/branches/bleeding_edge/src/flag-definitions.h
/branches/bleeding_edge/src/incremental-marking.cc
/branches/bleeding_edge/src/mark-compact.cc
/branches/bleeding_edge/src/mark-compact.h
=======================================
--- /branches/bleeding_edge/src/flag-definitions.h Fri Feb 3 04:05:08 2012
+++ /branches/bleeding_edge/src/flag-definitions.h Tue Feb 7 00:51:47 2012
@@ -307,7 +307,6 @@
"Flush code caches in maps during mark compact cycle.")
DEFINE_bool(never_compact, false,
"Never perform compaction on full GC - testing only")
-DEFINE_bool(compact_code_space, false, "Compact code space")
DEFINE_bool(cleanup_code_caches_at_gc, true,
"Flush inline caches prior to mark compact collection and "
"flush code caches in maps during mark compact cycle.")
=======================================
--- /branches/bleeding_edge/src/incremental-marking.cc Tue Jan 31 05:33:44
2012
+++ /branches/bleeding_edge/src/incremental-marking.cc Tue Feb 7 00:51:47
2012
@@ -505,7 +505,8 @@
}
is_compacting_ = !FLAG_never_compact && (flag == ALLOW_COMPACTION) &&
- heap_->mark_compact_collector()->StartCompaction();
+ heap_->mark_compact_collector()->StartCompaction(
+ MarkCompactCollector::INCREMENTAL_COMPACTION);
state_ = MARKING;
=======================================
--- /branches/bleeding_edge/src/mark-compact.cc Fri Feb 3 06:30:48 2012
+++ /branches/bleeding_edge/src/mark-compact.cc Tue Feb 7 00:51:47 2012
@@ -242,14 +242,14 @@
}
-bool MarkCompactCollector::StartCompaction() {
+bool MarkCompactCollector::StartCompaction(CompactionMode mode) {
if (!compacting_) {
ASSERT(evacuation_candidates_.length() == 0);
CollectEvacuationCandidates(heap()->old_pointer_space());
CollectEvacuationCandidates(heap()->old_data_space());
- if (FLAG_compact_code_space) {
+ if (mode == NON_INCREMENTAL_COMPACTION) {
CollectEvacuationCandidates(heap()->code_space());
} else if (FLAG_trace_fragmentation) {
TraceFragmentation(heap()->code_space());
@@ -697,7 +697,7 @@
// Don't start compaction if we are in the middle of incremental
// marking cycle. We did not collect any slots.
if (!FLAG_never_compact && !was_marked_incrementally_) {
- StartCompaction();
+ StartCompaction(NON_INCREMENTAL_COMPACTION);
}
PagedSpaces spaces;
=======================================
--- /branches/bleeding_edge/src/mark-compact.h Fri Feb 3 06:16:40 2012
+++ /branches/bleeding_edge/src/mark-compact.h Tue Feb 7 00:51:47 2012
@@ -441,7 +441,12 @@
// Performs a global garbage collection.
void CollectGarbage();
- bool StartCompaction();
+ enum CompactionMode {
+ INCREMENTAL_COMPACTION,
+ NON_INCREMENTAL_COMPACTION
+ };
+
+ bool StartCompaction(CompactionMode mode);
void AbortCompaction();
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev