Index: test/cctest/test-cpu-profiler.cc |
diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc |
index be2a8945d836ad1214c85030374a355a601e30ae..72e6c1a9b7e3e008c283c8d3037c186c8903a6fa 100644 |
--- a/test/cctest/test-cpu-profiler.cc |
+++ b/test/cctest/test-cpu-profiler.cc |
@@ -1045,9 +1045,10 @@ static void TickLines(bool optimize) { |
" n += m * m * m;\n" |
" }\n" |
"}\n" |
+ "%s();" |
"%s(%s);\n" |
"%s();\n", |
- func_name, opt_func, func_name, func_name); |
+ func_name, func_name, opt_func, func_name, func_name); |
CompileRun(script.start()); |
@@ -1055,6 +1056,8 @@ static void TickLines(bool optimize) { |
v8::Utils::OpenHandle(*GetFunction(env.local(), func_name))); |
CHECK(func->shared()); |
CHECK(func->shared()->abstract_code()); |
+ CHECK(!optimize || func->IsOptimized() || |
+ !CcTest::i_isolate()->use_crankshaft()); |
i::AbstractCode* code = func->abstract_code(); |
CHECK(code); |
i::Address code_address = code->instruction_start(); |