123c38a5aa
When --maglev is set, tier up to Maglev from unoptimized tiers based on --interrupt-budget-for-maglev, initially set to 40KB (which should very roughly by 1/10th of the time until the TF tierup decision is made). On the first interrupt, a non-concurrent optimization to Maglev is requested, which the next call to the marked function will perform. - There is no support for tiering from Maglev to TF yet. - Maglev's language support is minimal and tests are not expected to pass with --maglev. - Disable --maglev by default for now. Drive-by: fixes related to Maglev flag definitions. Bug: v8:7700 Change-Id: I121bb3f4f3830fdd20e1d4a12d3e04f08a99be38 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3500302 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/main@{#79328}
27 lines
568 B
JavaScript
27 lines
568 B
JavaScript
// Copyright 2022 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 --maglev --no-stress-opt
|
|
|
|
function f(x) {
|
|
var y = 0;
|
|
for (var i = 0; i < x; i++) {
|
|
y = 1;
|
|
}
|
|
return y;
|
|
}
|
|
|
|
function g() {
|
|
// Test that normal tiering (without OptimizeMaglevOnNextCall) works.
|
|
for (let i = 0; i < 1000; i++) {
|
|
if (%ActiveTierIsMaglev(f)) break;
|
|
f(10);
|
|
}
|
|
}
|
|
%NeverOptimizeFunction(g);
|
|
|
|
g();
|
|
|
|
assertTrue(%ActiveTierIsMaglev(f));
|