Revert of Track how many pages trigger fallback strategies in GC (patchset #2 id...
authormachenbach <machenbach@chromium.org>
Tue, 24 Mar 2015 22:02:28 +0000 (15:02 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 24 Mar 2015 22:02:37 +0000 (22:02 +0000)
Reason for revert:
This seems to cause lots of crashes in layout tests debug:
../../third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp(67) : void blink::useCounterCallback(v8::Isolate *, v8::Isolate::UseCounte

http://build.chromium.org/p/client.v8/builders/V8-Blink%20Linux%2064%20%28dbg%29/builds/2332

Original issue's description:
> Track how many pages trigger fallback strategies in GC
>
> R=hpayer@chromium.org
> BUG=
>
> Committed: https://crrev.com/bb880058f6499510cff12d98dc7d524d35d769cb
> Cr-Commit-Position: refs/heads/master@{#27421}

TBR=hpayer@chromium.org,erikcorry@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27427}

include/v8.h
src/heap/mark-compact.cc
src/heap/mark-compact.h
src/heap/store-buffer.cc

index dd408c3b212ad7d385c7b246243dbdd0a574a914..6ce2df1160104396dce6d977118acadb59b39f01 100644 (file)
@@ -5073,7 +5073,7 @@ class V8_EXPORT Isolate {
   };
 
   /**
-   * Features reported via the SetUseCounterCallback callback. Do not change
+   * Features reported via the SetUseCounterCallback callback. Do not chang
    * assigned numbers of existing items; add new features to the end of this
    * list.
    */
@@ -5081,9 +5081,6 @@ class V8_EXPORT Isolate {
     kUseAsm = 0,
     kBreakIterator = 1,
     kLegacyConst = 2,
-    kMarkDequeOverflow = 3,
-    kStoreBufferOverflow = 4,
-    kSlotsBufferOverflow = 5,
     kUseCounterFeatureCount  // This enum value must be last.
   };
 
index d7623cbec3f51970a978a3e83cd6aabe4ec58b5c..f75f323c45a2bbf22794118b0838d5aa3b0e4234 100644 (file)
@@ -2041,7 +2041,6 @@ void MarkCompactCollector::EmptyMarkingDeque() {
 // overflowed objects in the heap so the overflow flag on the markings stack
 // is cleared.
 void MarkCompactCollector::RefillMarkingDeque() {
-  isolate()->CountUsage(v8::Isolate::UseCounterFeature::kMarkDequeOverflow);
   DCHECK(marking_deque_.overflowed());
 
   DiscoverGreyObjectsInNewSpace(heap(), &marking_deque_);
@@ -4530,30 +4529,6 @@ void MarkCompactCollector::RecordRelocSlot(RelocInfo* rinfo, Object* target) {
 }
 
 
-void MarkCompactCollector::EvictEvacuationCandidate(Page* page) {
-  if (FLAG_trace_fragmentation) {
-    PrintF("Page %p is too popular. Disabling evacuation.\n",
-           reinterpret_cast<void*>(page));
-  }
-
-  isolate()->CountUsage(v8::Isolate::UseCounterFeature::kSlotsBufferOverflow);
-
-  // TODO(gc) If all evacuation candidates are too popular we
-  // should stop slots recording entirely.
-  page->ClearEvacuationCandidate();
-
-  // We were not collecting slots on this page that point
-  // to other evacuation candidates thus we have to
-  // rescan the page after evacuation to discover and update all
-  // pointers to evacuated objects.
-  if (page->owner()->identity() == OLD_DATA_SPACE) {
-    evacuation_candidates_.RemoveElement(page);
-  } else {
-    page->SetFlag(Page::RESCAN_ON_EVACUATION);
-  }
-}
-
-
 void MarkCompactCollector::RecordCodeEntrySlot(Address slot, Code* target) {
   Page* target_page = Page::FromAddress(reinterpret_cast<Address>(target));
   if (target_page->IsEvacuationCandidate() &&
index 9e2730a205ac4328d8f6f68818abe173d4ab699c..ddb993f5a2f676491e732da2a1a39cae26c48b59 100644 (file)
@@ -589,6 +589,27 @@ class MarkCompactCollector {
         ->IsEvacuationCandidate();
   }
 
+  INLINE(void EvictEvacuationCandidate(Page* page)) {
+    if (FLAG_trace_fragmentation) {
+      PrintF("Page %p is too popular. Disabling evacuation.\n",
+             reinterpret_cast<void*>(page));
+    }
+
+    // TODO(gc) If all evacuation candidates are too popular we
+    // should stop slots recording entirely.
+    page->ClearEvacuationCandidate();
+
+    // We were not collecting slots on this page that point
+    // to other evacuation candidates thus we have to
+    // rescan the page after evacuation to discover and update all
+    // pointers to evacuated objects.
+    if (page->owner()->identity() == OLD_DATA_SPACE) {
+      evacuation_candidates_.RemoveElement(page);
+    } else {
+      page->SetFlag(Page::RESCAN_ON_EVACUATION);
+    }
+  }
+
   void RecordRelocSlot(RelocInfo* rinfo, Object* target);
   void RecordCodeEntrySlot(Address slot, Code* target);
   void RecordCodeTargetPatch(Address pc, Code* target);
@@ -673,7 +694,6 @@ class MarkCompactCollector {
   bool WillBeDeoptimized(Code* code);
   void RemoveDeadInvalidatedCode();
   void ProcessInvalidatedCode(ObjectVisitor* visitor);
-  void EvictEvacuationCandidate(Page* page);
 
   void StartSweeperThreads();
 
index b21bf27c13966184abec0cbec5d454c5ed5c7e4d..dec11daa90674b922d1a5510abd637323c08d654 100644 (file)
@@ -197,8 +197,6 @@ void StoreBuffer::ExemptPopularPages(int prime_sample_step, int threshold) {
   }
   if (created_new_scan_on_scavenge_pages) {
     Filter(MemoryChunk::SCAN_ON_SCAVENGE);
-    heap_->isolate()->CountUsage(
-        v8::Isolate::UseCounterFeature::kStoreBufferOverflow);
   }
   old_buffer_is_filtered_ = true;
 }