From 7b956716f7b4ed1d36255e4c82007bb390f45a8d Mon Sep 17 00:00:00 2001 From: "ricow@chromium.org" Date: Fri, 11 Jun 2010 07:06:51 +0000 Subject: [PATCH] Put code flushing behind flag - defaults to false. Since we have an issue with code flusing on the trybots preventing us from pushing to chromium, a new flag for enabling code flushing, --flush_code, is introduced with this change (defaulting to false). Review URL: http://codereview.chromium.org/2734005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/flag-definitions.h | 2 ++ src/heap.cc | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/flag-definitions.h b/src/flag-definitions.h index dc8efcc..91477f9 100644 --- a/src/flag-definitions.h +++ b/src/flag-definitions.h @@ -191,6 +191,8 @@ DEFINE_bool(trace_gc_verbose, false, "print more details following each garbage collection") DEFINE_bool(collect_maps, true, "garbage collect maps from which no objects can be reached") +DEFINE_bool(flush_code, false, + "flush code that we expect not to use again before full gc") // v8.cc DEFINE_bool(use_idle_notification, true, diff --git a/src/heap.cc b/src/heap.cc index 3115cb3..3fc7d02 100644 --- a/src/heap.cc +++ b/src/heap.cc @@ -605,8 +605,10 @@ void Heap::PerformGarbageCollection(AllocationSpace space, EnsureFromSpaceIsCommitted(); if (collector == MARK_COMPACTOR) { - // Flush all potentially unused code. - FlushCode(); + if (FLAG_flush_code) { + // Flush all potentially unused code. + FlushCode(); + } // Perform mark-sweep with optional compaction. MarkCompact(tracer); -- 2.7.4