e47d175738
Remove opt_count from SFI, which only had two real uses: 1. Detecting OSR in tests -- replaced with a stack walk in %GetOptimizationStatus 2. Naming optimization log files -- replaced with the optimization id This allows us to remove a field from the SFI, moving the bailout reason into the counters field. As a drive-by, add optimization marker information (e.g. marked for optimization) to the optimization status. Change-Id: Id77deb5dd5439dfba058a7e1e1748de26b717d0d Reviewed-on: https://chromium-review.googlesource.com/592028 Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#47009}
29 lines
607 B
JavaScript
29 lines
607 B
JavaScript
// Copyright 2017 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// Flags: --allow-natives-syntax --opt --no-always-opt --no-stress-fullcodegen
|
|
|
|
function foo() {}
|
|
|
|
assertEquals(0, %GetDeoptCount(foo));
|
|
|
|
foo();
|
|
foo();
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
foo();
|
|
|
|
assertOptimized(foo);
|
|
assertEquals(0, %GetDeoptCount(foo));
|
|
|
|
// Unlink the function.
|
|
%DeoptimizeFunction(foo);
|
|
|
|
assertUnoptimized(foo);
|
|
assertEquals(1, %GetDeoptCount(foo));
|
|
|
|
foo();
|
|
|
|
assertUnoptimized(foo);
|
|
assertEquals(1, %GetDeoptCount(foo));
|