Revision: 10031
Author:   [email protected]
Date:     Fri Nov 18 06:08:57 2011
Log: Add flag --collect-megamorphic-maps-from-stub-cache to help diagnose a
memory leak.
Review URL: http://codereview.chromium.org/8599006
http://code.google.com/p/v8/source/detail?r=10031

Modified:
 /branches/bleeding_edge/src/flag-definitions.h
 /branches/bleeding_edge/src/type-info.cc

=======================================
--- /branches/bleeding_edge/src/flag-definitions.h      Tue Nov  1 05:20:46 2011
+++ /branches/bleeding_edge/src/flag-definitions.h      Fri Nov 18 06:08:57 2011
@@ -128,6 +128,9 @@
 DEFINE_bool(limit_inlining, true, "limit code size growth from inlining")
 DEFINE_bool(eliminate_empty_blocks, true, "eliminate empty blocks")
 DEFINE_bool(loop_invariant_code_motion, true, "loop invariant code motion")
+DEFINE_bool(collect_megamorphic_maps_from_stub_cache,
+            true,
+            "crankshaft harvests type feedback from stub cache")
 DEFINE_bool(hydrogen_stats, false, "print statistics for hydrogen")
 DEFINE_bool(trace_hydrogen, false, "trace generated hydrogen to file")
 DEFINE_bool(trace_inlining, false, "trace inlining decisions")
=======================================
--- /branches/bleeding_edge/src/type-info.cc    Thu Nov 17 05:57:55 2011
+++ /branches/bleeding_edge/src/type-info.cc    Fri Nov 18 06:08:57 2011
@@ -419,7 +419,8 @@
     ASSERT(Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC);
   } else if (object->IsMap()) {
     types->Add(Handle<Map>::cast(object));
-  } else if (Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) {
+  } else if (FLAG_collect_megamorphic_maps_from_stub_cache &&
+      Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) {
     types->Reserve(4);
     ASSERT(object->IsCode());
     isolate_->stub_cache()->CollectMatchingMaps(types, *name, flags);

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to