Commit 0e4e7180 authored by Francis McCabe's avatar Francis McCabe Committed by Commit Bot

Revert "Mark functions for optimization only on bytecode budget interrupts"

This reverts commit 9efe315e.

Reason for revert: Causing time out issues on box2d tests:

https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20debug/27752

and

https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20-%20debug/29630

Original change's description:
> Mark functions for optimization only on bytecode budget interrupts
> 
> We used to mark functions for optimization on any interrupt. This sometimes
> causes functions to OSR when not needed. The implementation was such because
> we didn't have a different runtime function to distinguish bytecode budget
> interrupts from other interrupts. For lazy feedback allocation we added a
> new runtime function for bytecode budget interrupts so it makes it easier
> to actually mark functions only when needed.
> 
> This also includes a fix to reduce the stack limits for interrupts when
> entering a scope that allows interrupts from a postponed interrupt scope.
> 
> Bug: chromium:993061
> Change-Id: Iaf7b4dccb7a503e5b6bfcbb993bc7482aa593955
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1829218
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Commit-Queue: Mythri Alle <mythria@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#64048}

TBR=rmcilroy@chromium.org,mythria@chromium.org,leszeks@chromium.org

Change-Id: I97938934fdaa030b958695d18e1788d75c17077c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:993061
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1832645Reviewed-by: 's avatarFrancis McCabe <fgm@chromium.org>
Commit-Queue: Francis McCabe <fgm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64053}
parent 1e3c3876
......@@ -87,8 +87,6 @@ void StackGuard::PushInterruptsScope(InterruptsScope* scope) {
current->intercepted_flags_ &= ~scope->intercept_mask_;
}
thread_local_.interrupt_flags_ |= restored_flags;
if (has_pending_interrupts(access)) set_interrupt_limits(access);
}
if (!has_pending_interrupts(access)) reset_limits(access);
// Add scope to the chain.
......@@ -307,6 +305,8 @@ Object StackGuard::HandleInterrupts() {
}
isolate_->counters()->stack_interrupts()->Increment();
isolate_->counters()->runtime_profiler_ticks()->Increment();
isolate_->runtime_profiler()->MarkCandidatesForOptimization();
return ReadOnlyRoots(isolate_).undefined_value();
}
......
......@@ -14,7 +14,6 @@
#include "src/execution/frames-inl.h"
#include "src/execution/isolate-inl.h"
#include "src/execution/messages.h"
#include "src/execution/runtime-profiler.h"
#include "src/handles/maybe-handles.h"
#include "src/init/bootstrapper.h"
#include "src/logging/counters.h"
......@@ -297,11 +296,10 @@ RUNTIME_FUNCTION(Runtime_BytecodeBudgetInterrupt) {
function->feedback_vector().set_invocation_count(1);
return ReadOnlyRoots(isolate).undefined_value();
}
// Handle interrupts.
{
SealHandleScope shs(isolate);
isolate->counters()->runtime_profiler_ticks()->Increment();
isolate->runtime_profiler()->MarkCandidatesForOptimization();
return ReadOnlyRoots(isolate).undefined_value();
return isolate->stack_guard()->HandleInterrupts();
}
}
......
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