Commit 4453f89c authored by Mythri A's avatar Mythri A Committed by Commit Bot

Don't mark a function for optimization if feedback vector has optimized code

If feedback vector contains optimized code then we don't have to mark
the closure for optimization. The optimized code would be installed on
the next execution.

Bug: chromium:1030415
Change-Id: Ifc6bbdf6f99ac835ace828fc812e89d1100622f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1993293Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65689}
parent bfe21343
...@@ -172,7 +172,7 @@ bool RuntimeProfiler::MaybeOSR(JSFunction function, InterpretedFrame* frame) { ...@@ -172,7 +172,7 @@ bool RuntimeProfiler::MaybeOSR(JSFunction function, InterpretedFrame* frame) {
OptimizationReason RuntimeProfiler::ShouldOptimize(JSFunction function, OptimizationReason RuntimeProfiler::ShouldOptimize(JSFunction function,
BytecodeArray bytecode) { BytecodeArray bytecode) {
if (function.IsOptimized()) return OptimizationReason::kDoNotOptimize; if (function.HasOptimizedCode()) return OptimizationReason::kDoNotOptimize;
int ticks = function.feedback_vector().profiler_ticks(); int ticks = function.feedback_vector().profiler_ticks();
int ticks_for_optimization = int ticks_for_optimization =
kProfilerTicksBeforeOptimization + kProfilerTicksBeforeOptimization +
......
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