Commit 9b6d7531 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[test] Speedup serializer test for large code objects.

R=yangguo@chromium.org
TEST=cctest/test-serialize/CodeSerializerLargeCodeObject

Review-Url: https://codereview.chromium.org/2226233002
Cr-Commit-Position: refs/heads/master@{#38489}
parent c9379e5e
......@@ -321,17 +321,9 @@
}], # 'arch == ppc64 and simulator_run == True'
##############################################################################
['variant == stress', {
'test-serialize/CodeSerializerLargeCodeObject': [SKIP],
}], # variant == stress
##############################################################################
['variant == turbofan', {
# Too many inputs into the merge of the handler block. And slow!
'test-serialize/CodeSerializerLargeCodeObject': [SKIP],
# TODO(bmeurer): TurboFan embeds strong references to all kinds of objects
# via deoptimization data (Crankshaft also does this, but lack proper test
# coverage).
......@@ -344,14 +336,6 @@
}], # variant == turbofan
##############################################################################
['variant == turbofan_opt', {
# Too many inputs into the merge of the handler block. And slow!
'test-serialize/CodeSerializerLargeCodeObject': [SKIP],
}], # variant == turbofan_opt
##############################################################################
['variant == ignition', {
# TODO(rmcilroy,4680): Related to lack of code flushing. Check failed: !function->shared()->is_compiled() || function->IsOptimized().
......@@ -400,9 +384,6 @@
# with crankshaft.
'test-cpu-profiler/TickLinesOptimized': [SKIP],
# TOOD(mstarzinger): Test expectation does not respect bytecode array.
'test-serialize/CodeSerializerLargeCodeObject': [FAIL],
# TurboFan cpu profiler result is different.
'test-cpu-profiler/DeoptAtFirstLevelInlinedSource': [FAIL],
'test-cpu-profiler/DeoptAtSecondLevelInlinedSource': [FAIL],
......@@ -457,7 +438,6 @@
'test-run-inlining/SimpleInliningContextDeopt': [FAIL],
'test-run-inlining/SimpleInliningContext': [FAIL],
'test-run-inlining/SimpleInlining': [FAIL],
'test-serialize/CodeSerializerLargeCodeObject': [FAIL],
}], # variant == ignition_staging
##############################################################################
......@@ -529,9 +509,6 @@
# BUG(4751). Flaky with Ignition.
'test-cpu-profiler/JsNativeJsSample': [SKIP],
# TOOD(mstarzinger): Test expectation does not respect bytecode array.
'test-serialize/CodeSerializerLargeCodeObject': [FAIL],
# TODO(bmeurer): TurboFan embeds strong references to all kinds of objects
# via deoptimization data (Crankshaft also does this, but lack proper test
# coverage).
......
......@@ -1060,10 +1060,14 @@ TEST(CodeSerializerLargeCodeObject) {
v8::HandleScope scope(CcTest::isolate());
// The serializer only tests the shared code, which is always the unoptimized
// code. Don't even bother generating optimized code to avoid timeouts.
FLAG_always_opt = false;
Vector<const uint8_t> source =
ConstructSource(STATIC_CHAR_VECTOR("var j=1; try { if (j) throw 1;"),
STATIC_CHAR_VECTOR("for(var i=0;i<1;i++)j++;"),
STATIC_CHAR_VECTOR("} catch (e) { j=7; } j"), 10000);
ConstructSource(STATIC_CHAR_VECTOR("var j=1; if (!j) {"),
STATIC_CHAR_VECTOR("for (let i of Object.prototype);"),
STATIC_CHAR_VECTOR("} j=7; j"), 1500);
Handle<String> source_str =
isolate->factory()->NewStringFromOneByte(source).ToHandleChecked();
......@@ -1074,7 +1078,7 @@ TEST(CodeSerializerLargeCodeObject) {
CompileScript(isolate, source_str, Handle<String>(), &cache,
v8::ScriptCompiler::kProduceCodeCache);
CHECK(isolate->heap()->InSpace(orig->code(), LO_SPACE));
CHECK(isolate->heap()->InSpace(orig->abstract_code(), LO_SPACE));
Handle<SharedFunctionInfo> copy;
{
......
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