[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}
This commit is contained in:
mstarzinger 2016-08-09 05:16:48 -07:00 committed by Commit bot
parent c9379e5e86
commit 9b6d753170
2 changed files with 8 additions and 27 deletions

View File

@ -321,17 +321,9 @@
}], # 'arch == ppc64 and simulator_run == True' }], # 'arch == ppc64 and simulator_run == True'
##############################################################################
['variant == stress', {
'test-serialize/CodeSerializerLargeCodeObject': [SKIP],
}], # variant == stress
############################################################################## ##############################################################################
['variant == turbofan', { ['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 # TODO(bmeurer): TurboFan embeds strong references to all kinds of objects
# via deoptimization data (Crankshaft also does this, but lack proper test # via deoptimization data (Crankshaft also does this, but lack proper test
# coverage). # coverage).
@ -344,14 +336,6 @@
}], # variant == turbofan }], # 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', { ['variant == ignition', {
# TODO(rmcilroy,4680): Related to lack of code flushing. Check failed: !function->shared()->is_compiled() || function->IsOptimized(). # TODO(rmcilroy,4680): Related to lack of code flushing. Check failed: !function->shared()->is_compiled() || function->IsOptimized().
@ -400,9 +384,6 @@
# with crankshaft. # with crankshaft.
'test-cpu-profiler/TickLinesOptimized': [SKIP], 'test-cpu-profiler/TickLinesOptimized': [SKIP],
# TOOD(mstarzinger): Test expectation does not respect bytecode array.
'test-serialize/CodeSerializerLargeCodeObject': [FAIL],
# TurboFan cpu profiler result is different. # TurboFan cpu profiler result is different.
'test-cpu-profiler/DeoptAtFirstLevelInlinedSource': [FAIL], 'test-cpu-profiler/DeoptAtFirstLevelInlinedSource': [FAIL],
'test-cpu-profiler/DeoptAtSecondLevelInlinedSource': [FAIL], 'test-cpu-profiler/DeoptAtSecondLevelInlinedSource': [FAIL],
@ -457,7 +438,6 @@
'test-run-inlining/SimpleInliningContextDeopt': [FAIL], 'test-run-inlining/SimpleInliningContextDeopt': [FAIL],
'test-run-inlining/SimpleInliningContext': [FAIL], 'test-run-inlining/SimpleInliningContext': [FAIL],
'test-run-inlining/SimpleInlining': [FAIL], 'test-run-inlining/SimpleInlining': [FAIL],
'test-serialize/CodeSerializerLargeCodeObject': [FAIL],
}], # variant == ignition_staging }], # variant == ignition_staging
############################################################################## ##############################################################################
@ -529,9 +509,6 @@
# BUG(4751). Flaky with Ignition. # BUG(4751). Flaky with Ignition.
'test-cpu-profiler/JsNativeJsSample': [SKIP], '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 # TODO(bmeurer): TurboFan embeds strong references to all kinds of objects
# via deoptimization data (Crankshaft also does this, but lack proper test # via deoptimization data (Crankshaft also does this, but lack proper test
# coverage). # coverage).

View File

@ -1060,10 +1060,14 @@ TEST(CodeSerializerLargeCodeObject) {
v8::HandleScope scope(CcTest::isolate()); 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 = Vector<const uint8_t> source =
ConstructSource(STATIC_CHAR_VECTOR("var j=1; try { if (j) throw 1;"), ConstructSource(STATIC_CHAR_VECTOR("var j=1; if (!j) {"),
STATIC_CHAR_VECTOR("for(var i=0;i<1;i++)j++;"), STATIC_CHAR_VECTOR("for (let i of Object.prototype);"),
STATIC_CHAR_VECTOR("} catch (e) { j=7; } j"), 10000); STATIC_CHAR_VECTOR("} j=7; j"), 1500);
Handle<String> source_str = Handle<String> source_str =
isolate->factory()->NewStringFromOneByte(source).ToHandleChecked(); isolate->factory()->NewStringFromOneByte(source).ToHandleChecked();
@ -1074,7 +1078,7 @@ TEST(CodeSerializerLargeCodeObject) {
CompileScript(isolate, source_str, Handle<String>(), &cache, CompileScript(isolate, source_str, Handle<String>(), &cache,
v8::ScriptCompiler::kProduceCodeCache); v8::ScriptCompiler::kProduceCodeCache);
CHECK(isolate->heap()->InSpace(orig->code(), LO_SPACE)); CHECK(isolate->heap()->InSpace(orig->abstract_code(), LO_SPACE));
Handle<SharedFunctionInfo> copy; Handle<SharedFunctionInfo> copy;
{ {