Commit 21af424e authored by Jakob Linke's avatar Jakob Linke Committed by V8 LUCI CQ

[tiering] Fix the OSR condition

The buggy version was introduced in crrev.com/c/3629149. Currently we
only use this OSR mechanic for a Turbofan target tier.

Bug: v8:7700,chromium:1352010
Change-Id: I5e6d5803c489360a6fa5cca6cca1966dd4bb5c48
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825890
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82397}
parent 361e24bc
......@@ -263,8 +263,10 @@ void TieringManager::MaybeOptimizeFrame(JSFunction function,
const bool is_marked_for_any_optimization =
(static_cast<uint32_t>(tiering_state) & kNoneOrInProgressMask) != 0;
// TODO(v8:7700): Change the condition below for Maglev OSR once it is
// implemented.
if (is_marked_for_any_optimization ||
function.HasAvailableHigherTierCodeThan(code_kind)) {
function.HasAvailableCodeKind(CodeKind::TURBOFAN)) {
// OSR kicks in only once we've previously decided to tier up, but we are
// still in the unoptimized frame (this implies a long-running loop).
if (SmallEnoughForOSR(isolate_, function)) {
......@@ -277,7 +279,7 @@ void TieringManager::MaybeOptimizeFrame(JSFunction function,
}
DCHECK(!is_marked_for_any_optimization &&
!function.HasAvailableHigherTierCodeThan(code_kind));
!function.HasAvailableCodeKind(CodeKind::TURBOFAN));
OptimizationDecision d = ShouldOptimize(function, code_kind);
if (d.should_optimize()) Optimize(function, d);
}
......
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