Put preservation of optimized code map behind a flag.

R=hpayer@chromium.org

Review URL: https://codereview.chromium.org/15119004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14700 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1d177c00
......@@ -268,6 +268,8 @@ DEFINE_bool(lookup_sample_by_shared, true,
"info, not JSFunction itself")
DEFINE_bool(cache_optimized_code, true,
"cache optimized code for closures")
DEFINE_bool(flush_optimized_code_cache, true,
"flushes the cache of optimized code for closures on every GC")
DEFINE_bool(inline_construct, true, "inline constructor calls")
DEFINE_bool(inline_arguments, true, "inline functions with arguments object")
DEFINE_bool(inline_accessors, true, "inline JavaScript accessors")
......
......@@ -311,6 +311,12 @@ void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo(
if (shared->ic_age() != heap->global_ic_age()) {
shared->ResetForNewContext(heap->global_ic_age());
}
if (FLAG_cache_optimized_code &&
FLAG_flush_optimized_code_cache &&
!shared->optimized_code_map()->IsSmi()) {
// Always flush the optimized code map if requested by flag.
shared->ClearOptimizedCodeMap();
}
MarkCompactCollector* collector = heap->mark_compact_collector();
if (collector->is_code_flushing_enabled()) {
if (FLAG_cache_optimized_code && !shared->optimized_code_map()->IsSmi()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment