Revision: 14700
Author:   [email protected]
Date:     Thu May 16 01:39:24 2013
Log:      Put preservation of optimized code map behind a flag.

[email protected]

Review URL: https://codereview.chromium.org/15119004
http://code.google.com/p/v8/source/detail?r=14700

Modified:
 /branches/bleeding_edge/src/flag-definitions.h
 /branches/bleeding_edge/src/objects-visiting-inl.h

=======================================
--- /branches/bleeding_edge/src/flag-definitions.h      Wed May 15 09:09:25 2013
+++ /branches/bleeding_edge/src/flag-definitions.h      Thu May 16 01:39:24 2013
@@ -268,6 +268,8 @@
             "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")
=======================================
--- /branches/bleeding_edge/src/objects-visiting-inl.h Wed May 15 09:09:25 2013 +++ /branches/bleeding_edge/src/objects-visiting-inl.h Thu May 16 01:39:24 2013
@@ -311,6 +311,12 @@
   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()) {

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to