Commit 38aca8f5 authored by Leszek Swirski's avatar Leszek Swirski Committed by V8 LUCI CQ

[tiering] Don't tier up if we don't pass filters

Check the turbofan and maglev filters when deciding whether to tier up,
rather than tiering up even when filters don't pass, then failing to
compile when actually trying the compilation.

Change-Id: I92eac9aaca1e33e97b77afcc531b9af4d3a9288a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3702444
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81135}
parent 07bc22a9
......@@ -286,6 +286,7 @@ OptimizationDecision TieringManager::ShouldOptimize(JSFunction function,
DCHECK_EQ(code_kind, function.GetActiveTier().value());
if (TiersUpToMaglev(code_kind) &&
function.shared().PassesFilter(FLAG_maglev_filter) &&
!function.shared(isolate_).maglev_compilation_failed()) {
return OptimizationDecision::Maglev();
} else if (code_kind == CodeKind::TURBOFAN) {
......@@ -293,6 +294,10 @@ OptimizationDecision TieringManager::ShouldOptimize(JSFunction function,
return OptimizationDecision::DoNotOptimize();
}
if (!FLAG_turbofan || !function.shared().PassesFilter(FLAG_turbo_filter)) {
return OptimizationDecision::DoNotOptimize();
}
BytecodeArray bytecode = function.shared().GetBytecodeArray(isolate_);
const int ticks = function.feedback_vector().profiler_ticks();
const int ticks_for_optimization =
......
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