Reviewers: Lasse Reichstein, Description: Add flag --collect-megamorphic-maps-from-stub-cache to help diagnose a memory leak.
Please review this at http://codereview.chromium.org/8599006/ SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/flag-definitions.h M src/type-info.cc Index: src/flag-definitions.h =================================================================== --- src/flag-definitions.h (revision 10013) +++ src/flag-definitions.h (working copy) @@ -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") Index: src/type-info.cc =================================================================== --- src/type-info.cc (revision 10013) +++ src/type-info.cc (working copy) @@ -415,7 +415,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
