Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(822)

Unified Diff: src/runtime/runtime-compiler.cc

Issue 2391533002: [turbofan] Mark for non-concurrent recompilation on OSR (Closed)
Patch Set: reword comment Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-compiler.cc
diff --git a/src/runtime/runtime-compiler.cc b/src/runtime/runtime-compiler.cc
index 37484f379d4d87bebf5f9d2985c4d4b730d41f64..01ec73d427d8dec5a8ef53c791c4bbcbf8c316f9 100644
--- a/src/runtime/runtime-compiler.cc
+++ b/src/runtime/runtime-compiler.cc
@@ -361,7 +361,20 @@ RUNTIME_FUNCTION(Runtime_CompileForOnStackReplacement) {
// match. Fix heuristics for reenabling optimizations!
function->shared()->increment_deopt_count();
- if (!result->is_turbofanned()) {
+ if (result->is_turbofanned()) {
+ // When we're waiting for concurrent optimization, set to compile on
+ // the next call - otherwise we'd run unoptimized once more
+ // and potentially compile for OSR another time as well.
+ if (function->IsMarkedForConcurrentOptimization()) {
+ if (FLAG_trace_osr) {
+ PrintF("[OSR - Re-marking ");
+ function->PrintName();
+ PrintF(" for non-concurrent optimization]\n");
+ }
+ function->ReplaceCode(
+ isolate->builtins()->builtin(Builtins::kCompileOptimized));
+ }
+ } else {
// Crankshafted OSR code can be installed into the function.
function->ReplaceCode(*result);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698