Revision: 20550
Author:   [email protected]
Date:     Mon Apr  7 14:22:32 2014 UTC
Log:      Remove gc greedy mode.

BUG=
[email protected]

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

Deleted:
 /branches/bleeding_edge/test/mjsunit/greedy.js
Modified:
 /branches/bleeding_edge/src/flag-definitions.h
 /branches/bleeding_edge/src/heap-inl.h
 /branches/bleeding_edge/src/heap.cc
 /branches/bleeding_edge/src/heap.h

=======================================
--- /branches/bleeding_edge/test/mjsunit/greedy.js Mon Sep 24 10:01:35 2012 UTC
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2008 the V8 project authors. All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-//       notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-//       copyright notice, this list of conditions and the following
-//       disclaimer in the documentation and/or other materials provided
-//       with the distribution.
-//     * Neither the name of Google Inc. nor the names of its
-//       contributors may be used to endorse or promote products derived
-//       from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Flags: --gc-greedy --noverify-heap
-
-function IterativeFib(n) {
-  var f0 = 0, f1 = 1;
-  for (; n > 0; --n) {
-    var f2 = f0 + f1;
-    f0 = f1; f1 = f2;
-  }
-  return f0;
-}
-
-function RecursiveFib(n) {
-  if (n <= 1) return n;
-  return RecursiveFib(n - 1) + RecursiveFib(n - 2);
-}
-
-function Check(n, expected) {
-  var i = IterativeFib(n);
-  var r = RecursiveFib(n);
-  assertEquals(i, expected);
-  assertEquals(r, expected);
-}
-
-Check(0, 0);
-Check(1, 1);
-Check(2, 1);
-Check(3, 1 + 1);
-Check(4, 2 + 1);
-Check(5, 3 + 2);
-Check(10, 55);
-Check(15, 610);
-Check(20, 6765);
-assertEquals(IterativeFib(75), 2111485077978050);
=======================================
--- /branches/bleeding_edge/src/flag-definitions.h Tue Apr 1 11:23:23 2014 UTC +++ /branches/bleeding_edge/src/flag-definitions.h Mon Apr 7 14:22:32 2014 UTC
@@ -743,7 +743,6 @@
 DEFINE_bool(trace_contexts, false, "trace contexts operations")

 // heap.cc
-DEFINE_bool(gc_greedy, false, "perform GC prior to some allocations")
 DEFINE_bool(gc_verbose, false, "print stuff during garbage collection")
DEFINE_bool(heap_stats, false, "report heap statistics before and after GC")
 DEFINE_bool(code_stats, false, "report code statistics after GC")
=======================================
--- /branches/bleeding_edge/src/heap-inl.h      Wed Apr  2 16:36:16 2014 UTC
+++ /branches/bleeding_edge/src/heap-inl.h      Mon Apr  7 14:22:32 2014 UTC
@@ -627,13 +627,6 @@
 }


-#ifdef DEBUG
-#define GC_GREEDY_CHECK(ISOLATE) \
-  if (FLAG_gc_greedy) (ISOLATE)->heap()->GarbageCollectionGreedyCheck()
-#else
-#define GC_GREEDY_CHECK(ISOLATE) { }
-#endif
-
 // Calls the FUNCTION_CALL function and retries it up to three times
 // to guarantee that any allocations performed during the call will
 // succeed if there's enough memory.
@@ -643,7 +636,6 @@

#define CALL_AND_RETRY(ISOLATE, FUNCTION_CALL, RETURN_VALUE, RETURN_EMPTY) \ do { \ - GC_GREEDY_CHECK(ISOLATE); \ MaybeObject* __maybe_object__ = FUNCTION_CALL; \ Object* __object__ = NULL; \ if (__maybe_object__->ToObject(&__object__)) RETURN_VALUE; \
=======================================
--- /branches/bleeding_edge/src/heap.cc Mon Apr  7 13:40:03 2014 UTC
+++ /branches/bleeding_edge/src/heap.cc Mon Apr  7 14:22:32 2014 UTC
@@ -7521,17 +7521,6 @@
 void DescriptorLookupCache::Clear() {
   for (int index = 0; index < kLength; index++) keys_[index].source = NULL;
 }
-
-
-#ifdef DEBUG
-void Heap::GarbageCollectionGreedyCheck() {
-  ASSERT(FLAG_gc_greedy);
-  if (isolate_->bootstrapper()->IsActive()) return;
-  if (!AllowAllocationFailure::IsAllowed(isolate_)) return;
-  if (!AllowHeapAllocation::IsAllowed()) return;
-  CollectGarbage(NEW_SPACE);
-}
-#endif


 void ExternalStringTable::CleanUp() {
=======================================
--- /branches/bleeding_edge/src/heap.h  Mon Apr  7 12:43:35 2014 UTC
+++ /branches/bleeding_edge/src/heap.h  Mon Apr  7 14:22:32 2014 UTC
@@ -1255,11 +1255,6 @@
   }

   PromotionQueue* promotion_queue() { return &promotion_queue_; }
-
-#ifdef DEBUG
-  // Utility used with flag gc-greedy.
-  void GarbageCollectionGreedyCheck();
-#endif

   void AddGCPrologueCallback(v8::Isolate::GCPrologueCallback callback,
                              GCType gc_type_filter,

--
--
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/d/optout.

Reply via email to