Commit 6cbeead0 authored by Juliana Franco's avatar Juliana Franco Committed by Commit Bot

Remove broken/unsafe FLAG_deopt_every_n_garbage_collections flag.

Also nuke the disabled test that still uses --deopt-every-n-garbage-collections.

Bug: v8:3389
Change-Id: I254f544b73271e768e7619e578535aaf7cef0530
Reviewed-on: https://chromium-review.googlesource.com/561005Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Juliana Patricia Vicente Franco <jupvfranco@google.com>
Cr-Commit-Position: refs/heads/master@{#46431}
parent 15121728
......@@ -391,8 +391,6 @@ DEFINE_BOOL(stress_pointer_maps, false, "pointer map for every instruction")
DEFINE_BOOL(stress_environments, false, "environment for every instruction")
DEFINE_INT(deopt_every_n_times, 0,
"deoptimize every n times a deopt point is passed")
DEFINE_INT(deopt_every_n_garbage_collections, 0,
"deoptimize every n garbage collections")
DEFINE_BOOL(print_deopt_stress, false, "print number of possible deopt points")
DEFINE_BOOL(trap_on_deopt, false, "put a break point before deoptimizing")
DEFINE_BOOL(trap_on_stub_deopt, false,
......
......@@ -149,7 +149,6 @@ Heap::Heap()
new_space_allocation_counter_(0),
old_generation_allocation_counter_at_last_gc_(0),
old_generation_size_at_last_gc_(0),
gcs_since_last_deopt_(0),
global_pretenuring_feedback_(nullptr),
ring_buffer_full_(false),
ring_buffer_end_(0),
......@@ -723,15 +722,6 @@ void Heap::GarbageCollectionEpilogue() {
if (FLAG_code_stats) ReportCodeStatistics("After GC");
if (FLAG_check_handle_count) CheckHandleCount();
#endif
if (FLAG_deopt_every_n_garbage_collections > 0) {
// TODO(jkummerow/ulan/jarin): This is not safe! We can't assume that
// the topmost optimized frame can be deoptimized safely, because it
// might not have a lazy bailout point right after its current PC.
if (++gcs_since_last_deopt_ == FLAG_deopt_every_n_garbage_collections) {
Deoptimizer::DeoptimizeAll(isolate());
gcs_since_last_deopt_ = 0;
}
}
UpdateMaximumCommitted();
......
......@@ -2336,11 +2336,6 @@ class Heap {
// The size of objects in old generation after the last MarkCompact GC.
size_t old_generation_size_at_last_gc_;
// If the --deopt_every_n_garbage_collections flag is set to a positive value,
// this variable holds the number of garbage collections since the last
// deoptimization triggered by garbage collection.
int gcs_since_last_deopt_;
// The feedback storage is used to store allocation sites (keys) and how often
// they have been visited (values) by finding a memento behind an object. The
// storage is only alive temporary during a GC. The invariant is that all
......
......@@ -48,9 +48,6 @@
# This test non-deterministically runs out of memory on Windows ia32.
'regress/regress-crbug-160010': [SKIP],
# Issue 3389: deopt_every_n_garbage_collections is unsafe
'regress/regress-2653': [SKIP],
# Issue 3784: setters-on-elements is flaky
'setters-on-elements': [PASS, FAIL],
......@@ -563,17 +560,13 @@
# Deopting uses just enough memory to make this one OOM.
'regress/regress-3976': [SKIP],
# Deopt every n garbage collections collides with deopt every n times.
'regress/regress-2653': [SKIP],
# Too slow.
'es6/tail-call-megatest*': [SKIP],
# Forced optimisation path tests.
'shared-function-tier-up-turbo': [SKIP],
# Fails deopt_fuzzer due to --deopt_every_n_times or
# deopt_every_n_garbage_collections
# Fails deopt_fuzzer due to --deopt_every_n_times
'es6/array-iterator-turbo': [SKIP]
}], # 'deopt_fuzzer == True'
......
// Copyright 2013 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: --allow-natives-syntax --deopt-every-n-garbage-collections=1
function foo(a, b) {
var l = a.length;
var array = new Array(l);
for (var k = 0; k < l; k++) {
array[k] = 120;
}
var result = new Array(l);
for (var i = 0; i < l; i++) {
result[i] = array[i];
}
return result;
}
a = "xxxxxxxxxxxxxxxxxxxxxxxxx";
while (a.length < 100000) a = a + a;
foo(a, []);
%OptimizeFunctionOnNextCall(foo)
foo(a, []);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment