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

Unified Diff: test/cctest/test-cpu-profiler.cc

Issue 2369043002: Remove decision by Turbofan OSR to optimize on next call (Closed)
Patch Set: fix TickLinesBaseline Created 4 years, 3 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 | « src/runtime/runtime-compiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-cpu-profiler.cc
diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc
index 23524598fa576251351b04523a3b8bbe5b6f3b7a..8ae0cced13369b0b0c7f30880ee92c41bb631cef 100644
--- a/test/cctest/test-cpu-profiler.cc
+++ b/test/cctest/test-cpu-profiler.cc
@@ -1032,10 +1032,16 @@ static void TickLines(bool optimize) {
i::HandleScope scope(isolate);
i::EmbeddedVector<char, 512> script;
+ i::EmbeddedVector<char, 64> optimize_call;
const char* func_name = "func";
- const char* opt_func =
- optimize ? "%OptimizeFunctionOnNextCall" : "%NeverOptimizeFunction";
+ if (!optimize) {
+ i::FLAG_crankshaft = false;
rmcilroy 2016/09/27 15:27:45 Could you just do this at the start of TickLinesBa
klaasb 2016/09/27 15:54:40 Done.
+ i::SNPrintF(optimize_call, "");
+ } else {
+ i::SNPrintF(optimize_call, "%%OptimizeFunctionOnNextCall(%s);\n",
+ func_name);
+ }
i::SNPrintF(script,
"function %s() {\n"
" var n = 0;\n"
@@ -1045,10 +1051,10 @@ static void TickLines(bool optimize) {
" n += m * m * m;\n"
" }\n"
"}\n"
- "%s();"
- "%s(%s);\n"
+ "%s();\n"
+ "%s"
"%s();\n",
- func_name, func_name, opt_func, func_name, func_name);
+ func_name, func_name, optimize_call.start(), func_name);
CompileRun(script.start());
« no previous file with comments | « src/runtime/runtime-compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698