Commit d7f767e1 authored by Mythri A's avatar Mythri A Committed by Commit Bot

[turboprop][runtime-profiler] Fix a bug that disabled OSR

This cl: https://chromium-review.googlesource.com/c/v8/v8/+/2632588
introduced a bug by bailing out early if we have top tier code early.
However, we still need to check if the frame is still interpreted
so that we could OSR. The early bailout isn't correct and also the
DCHECK isn't correct. This cl removes both.

Bug: chromium:1167638, v8:9684
Change-Id: I5a4aa406b05b6cbb5f98b63e015298c5b45160eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2632696Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72128}
parent 589677bc
...@@ -160,7 +160,6 @@ void RuntimeProfiler::AttemptOnStackReplacement(InterpretedFrame* frame, ...@@ -160,7 +160,6 @@ void RuntimeProfiler::AttemptOnStackReplacement(InterpretedFrame* frame,
void RuntimeProfiler::MaybeOptimizeFrame(JSFunction function, void RuntimeProfiler::MaybeOptimizeFrame(JSFunction function,
JavaScriptFrame* frame, JavaScriptFrame* frame,
CodeKind code_kind) { CodeKind code_kind) {
DCHECK(CodeKindCanTierUp(code_kind));
if (function.IsInOptimizationQueue()) { if (function.IsInOptimizationQueue()) {
TraceInOptimizationQueue(function); TraceInOptimizationQueue(function);
return; return;
...@@ -308,10 +307,6 @@ void RuntimeProfiler::MarkCandidatesForOptimization(JavaScriptFrame* frame) { ...@@ -308,10 +307,6 @@ void RuntimeProfiler::MarkCandidatesForOptimization(JavaScriptFrame* frame) {
JSFunction function = frame->function(); JSFunction function = frame->function();
CodeKind code_kind = function.GetActiveTier(); CodeKind code_kind = function.GetActiveTier();
// For recursive functions it could happen that we have some frames
// still executing mid-tier code even after the function had higher tier code.
// In such cases, ignore any interrupts from the mid-tier code.
if (!CodeKindCanTierUp(code_kind)) return;
DCHECK(function.shared().is_compiled()); DCHECK(function.shared().is_compiled());
DCHECK(function.shared().IsInterpreted()); DCHECK(function.shared().IsInterpreted());
......
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