Commit ca4707f7 authored by georgia.kouveli's avatar georgia.kouveli Committed by Commit bot

Fixing test issue in test-cpu-profiler/TickLinesOptimized.

The test was calling OptimizeFunctionOnNextCall on a function before
ever executing it - crankshaft therefore didn't have any type info and
was generating a soft deoptimization bailout. Make sure we execute the
function before calling OptimizeFunctionOnNextCall to avoid this issue.

BUG=

Review-Url: https://codereview.chromium.org/2168603003
Cr-Commit-Position: refs/heads/master@{#38171}
parent edd65cc4
......@@ -176,6 +176,10 @@
# BUG(4751). Flaky with ignition.
'test-cpu-profiler/JsNativeJsSample': [PASS, NO_IGNITION],
# TODO(ignition): Fails due to missing type info when optimizing from bytecode
# with crankshaft.
'test-cpu-profiler/TickLinesOptimized': [PASS, NO_IGNITION],
}], # ALWAYS
##############################################################################
......
......@@ -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();
......
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