Revision: 18927
Author:   [email protected]
Date:     Wed Jan 29 17:03:57 2014 UTC
Log:      Make eager allocation site pretenuring decisions.

BUG=
[email protected]

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

Modified:
 /branches/bleeding_edge/src/heap-inl.h
 /branches/bleeding_edge/src/heap.cc
 /branches/bleeding_edge/src/heap.h
 /branches/bleeding_edge/src/objects.cc

=======================================
--- /branches/bleeding_edge/src/heap-inl.h      Thu Jan 16 17:08:45 2014 UTC
+++ /branches/bleeding_edge/src/heap-inl.h      Wed Jan 29 17:03:57 2014 UTC
@@ -491,7 +491,6 @@
   ASSERT(heap->InNewSpace(object));

   if (!FLAG_allocation_site_pretenuring ||
-      !heap->new_space_high_promotion_mode_active_ ||
       !AllocationSite::CanTrack(object->map()->instance_type())) return;

// Either object is the last object in the from space, or there is another
=======================================
--- /branches/bleeding_edge/src/heap.cc Wed Jan 29 15:49:48 2014 UTC
+++ /branches/bleeding_edge/src/heap.cc Wed Jan 29 17:03:57 2014 UTC
@@ -506,8 +506,7 @@


 void Heap::ProcessPretenuringFeedback() {
-  if (FLAG_allocation_site_pretenuring &&
-      new_space_high_promotion_mode_active_) {
+  if (FLAG_allocation_site_pretenuring) {
     int tenure_decisions = 0;
     int dont_tenure_decisions = 0;
     int allocation_mementos_found = 0;
@@ -1113,9 +1112,7 @@
     // to deoptimize all optimized code in global pretenuring mode and all
     // code which should be tenured in local pretenuring mode.
     if (FLAG_pretenuring) {
-      if (FLAG_allocation_site_pretenuring) {
-        ResetAllAllocationSitesDependentCode(NOT_TENURED);
-      } else {
+      if (!FLAG_allocation_site_pretenuring) {
         isolate_->stack_guard()->FullDeopt();
       }
     }
=======================================
--- /branches/bleeding_edge/src/heap.h  Wed Jan 29 15:49:48 2014 UTC
+++ /branches/bleeding_edge/src/heap.h  Wed Jan 29 17:03:57 2014 UTC
@@ -1512,17 +1512,11 @@
       8 * (Page::kPageSize > MB ? Page::kPageSize : MB);

   intptr_t OldGenerationAllocationLimit(intptr_t old_gen_size) {
-    const int divisor = FLAG_stress_compaction ? 10 :
-        new_space_high_promotion_mode_active_ ? 1 : 3;
+    const int divisor = FLAG_stress_compaction ? 10 : 1;
     intptr_t limit =
         Max(old_gen_size + old_gen_size / divisor,
             kMinimumOldGenerationAllocationLimit);
     limit += new_space_.Capacity();
- // TODO(hpayer): Can be removed when when pretenuring is supported for all
-    // allocation sites.
-    if (IsHighSurvivalRate() && IsStableOrIncreasingSurvivalTrend()) {
-      limit *= 2;
-    }
intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2;
     return Min(limit, halfway_to_the_max);
   }
=======================================
--- /branches/bleeding_edge/src/objects.cc      Wed Jan 29 14:31:34 2014 UTC
+++ /branches/bleeding_edge/src/objects.cc      Wed Jan 29 17:03:57 2014 UTC
@@ -12733,8 +12733,7 @@
 PretenureFlag AllocationSite::GetPretenureMode() {
   PretenureDecision mode = pretenure_decision();
   // Zombie objects "decide" to be untenured.
-  return (mode == kTenure && GetHeap()->GetPretenureMode() == TENURED)
-      ? TENURED : NOT_TENURED;
+  return mode == kTenure ? TENURED : NOT_TENURED;
 }


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