Revision: 17526
Author:   [email protected]
Date:     Wed Nov  6 15:47:05 2013 UTC
Log:      Age ICs on context dispose notification.

[email protected]
BUG=309723

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

Modified:
 /branches/bleeding_edge/src/code-stubs-hydrogen.cc
 /branches/bleeding_edge/src/compiler.cc
 /branches/bleeding_edge/src/heap.cc
 /branches/bleeding_edge/src/objects.cc

=======================================
--- /branches/bleeding_edge/src/code-stubs-hydrogen.cc Mon Oct 28 09:36:49 2013 UTC +++ /branches/bleeding_edge/src/code-stubs-hydrogen.cc Wed Nov 6 15:47:05 2013 UTC
@@ -1241,8 +1241,6 @@
                         HObjectAccess::ForSharedFunctionInfoPointer(),
                         shared_info);
Add<HStoreNamedField>(js_function, HObjectAccess::ForFunctionContextPointer(),
-                        shared_info);
- Add<HStoreNamedField>(js_function, HObjectAccess::ForFunctionContextPointer(),
                         context());

   // Initialize the code pointer in the function to be the one
=======================================
--- /branches/bleeding_edge/src/compiler.cc     Mon Oct 28 17:54:43 2013 UTC
+++ /branches/bleeding_edge/src/compiler.cc     Wed Nov  6 15:47:05 2013 UTC
@@ -262,8 +262,11 @@

 void RecompileJob::RecordOptimizationStats() {
   Handle<JSFunction> function = info()->closure();
-  int opt_count = function->shared()->opt_count();
-  function->shared()->set_opt_count(opt_count + 1);
+  if (!function->IsOptimized()) {
+    // Concurrent recompilation and OSR may race.  Increment only once.
+    int opt_count = function->shared()->opt_count();
+    function->shared()->set_opt_count(opt_count + 1);
+  }
   double ms_creategraph = time_taken_to_create_graph_.InMillisecondsF();
   double ms_optimize = time_taken_to_optimize_.InMillisecondsF();
   double ms_codegen = time_taken_to_codegen_.InMillisecondsF();
=======================================
--- /branches/bleeding_edge/src/heap.cc Wed Nov  6 15:45:43 2013 UTC
+++ /branches/bleeding_edge/src/heap.cc Wed Nov  6 15:47:05 2013 UTC
@@ -767,6 +767,7 @@
     isolate()->optimizing_compiler_thread()->Flush();
   }
   flush_monomorphic_ics_ = true;
+  AgeInlineCaches();
   return ++contexts_disposed_;
 }

@@ -1164,8 +1165,6 @@

   isolate_->counters()->objs_since_last_full()->Set(0);

-  contexts_disposed_ = 0;
-
   flush_monomorphic_ics_ = false;
 }

@@ -5742,12 +5741,7 @@
       size_factor * IncrementalMarking::kAllocatedThreshold;

   if (contexts_disposed_ > 0) {
-    if (hint >= kMaxHint) {
- // The embedder is requesting a lot of GC work after context disposal,
-      // we age inline caches so that they don't keep objects from
-      // the old context alive.
-      AgeInlineCaches();
-    }
+    contexts_disposed_ = 0;
     int mark_sweep_time = Min(TimeMarkSweepWouldTakeInMs(), 1000);
     if (hint >= mark_sweep_time && !FLAG_expose_gc &&
         incremental_marking()->IsStopped()) {
@@ -5756,8 +5750,8 @@
                         "idle notification: contexts disposed");
     } else {
       AdvanceIdleIncrementalMarking(step_size);
-      contexts_disposed_ = 0;
     }
+
// After context disposal there is likely a lot of garbage remaining, reset // the idle notification counters in order to trigger more incremental GCs
     // on subsequent idle notifications.
=======================================
--- /branches/bleeding_edge/src/objects.cc      Wed Nov  6 15:45:43 2013 UTC
+++ /branches/bleeding_edge/src/objects.cc      Wed Nov  6 15:47:05 2013 UTC
@@ -9588,7 +9588,7 @@
   if (value->IsSmi()) {
     // No optimized code map.
     ASSERT_EQ(0, Smi::cast(value)->value());
-    // Crate 3 entries per context {context, code, literals}.
+    // Create 3 entries per context {context, code, literals}.
     MaybeObject* maybe = heap->AllocateFixedArray(kInitialLength);
     if (!maybe->To(&new_code_map)) return maybe;
     new_code_map->set(kEntriesStart + 0, native_context);

--
--
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