Commit f66d934b authored by bmeurer's avatar bmeurer Committed by Commit bot

[compiler] Log message when function is already in optimization queue.

Add log message when RuntimeProfiler checks whether to optimize a
function, but that function is already in the optimization queue
(with --trace-opt-verbose).

R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2740103003
Cr-Commit-Position: refs/heads/master@{#43711}
parent c8270759
......@@ -216,7 +216,14 @@ void RuntimeProfiler::MaybeOptimizeFullCodegen(JSFunction* function,
SharedFunctionInfo* shared = function->shared();
Code* shared_code = shared->code();
if (shared_code->kind() != Code::FUNCTION) return;
if (function->IsInOptimizationQueue()) return;
if (function->IsInOptimizationQueue()) {
if (FLAG_trace_opt_verbose) {
PrintF("[function ");
function->PrintName();
PrintF(" is already in optimization queue]\n");
}
return;
}
if (FLAG_always_osr) {
AttemptOnStackReplacement(frame, AbstractCode::kMaxLoopNestingMarker);
......@@ -308,7 +315,14 @@ void RuntimeProfiler::MaybeOptimizeFullCodegen(JSFunction* function,
void RuntimeProfiler::MaybeBaselineIgnition(JSFunction* function,
JavaScriptFrame* frame) {
if (function->IsInOptimizationQueue()) return;
if (function->IsInOptimizationQueue()) {
if (FLAG_trace_opt_verbose) {
PrintF("[function ");
function->PrintName();
PrintF(" is already in optimization queue]\n");
}
return;
}
if (FLAG_always_osr) {
AttemptOnStackReplacement(frame, AbstractCode::kMaxLoopNestingMarker);
......@@ -334,7 +348,14 @@ void RuntimeProfiler::MaybeBaselineIgnition(JSFunction* function,
void RuntimeProfiler::MaybeOptimizeIgnition(JSFunction* function,
JavaScriptFrame* frame) {
if (function->IsInOptimizationQueue()) return;
if (function->IsInOptimizationQueue()) {
if (FLAG_trace_opt_verbose) {
PrintF("[function ");
function->PrintName();
PrintF(" is already in optimization queue]\n");
}
return;
}
if (FLAG_always_osr) {
AttemptOnStackReplacement(frame, AbstractCode::kMaxLoopNestingMarker);
......
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