From 928cbcdc8dbdf6a97fd2bd368477c411ec7c2f04 Mon Sep 17 00:00:00 2001 From: "yangguo@chromium.org" Date: Thu, 20 Jun 2013 11:01:33 +0000 Subject: [PATCH] Skip parallel recompilation tests if parallel recompilation is disabled. Parallel recompilation is usually disabled on single-core systems. R=jkummerow@chromium.org BUG=v8:2733 Review URL: https://codereview.chromium.org/17261021 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- test/mjsunit/compiler/parallel-proto-change.js | 5 +++++ test/mjsunit/manual-parallel-recompile.js | 11 +++++++---- test/mjsunit/parallel-initial-prototype-change.js | 5 +++++ test/mjsunit/parallel-invalidate-transition-map.js | 5 +++++ test/mjsunit/parallel-optimize-disabled.js | 5 +++++ 5 files changed, 27 insertions(+), 4 deletions(-) diff --git a/test/mjsunit/compiler/parallel-proto-change.js b/test/mjsunit/compiler/parallel-proto-change.js index aa1ac6de90..2392a37c95 100644 --- a/test/mjsunit/compiler/parallel-proto-change.js +++ b/test/mjsunit/compiler/parallel-proto-change.js @@ -28,6 +28,11 @@ // Flags: --allow-natives-syntax // Flags: --parallel-recompilation --parallel-recompilation-delay=50 +if (!%IsParallelRecompilationSupported()) { + print("Parallel recompilation is disabled. Skipping this test."); + quit(); +} + function assertUnoptimized(fun) { assertTrue(%GetOptimizationStatus(fun) != 1); } diff --git a/test/mjsunit/manual-parallel-recompile.js b/test/mjsunit/manual-parallel-recompile.js index 5253487f4b..b502fb19ad 100644 --- a/test/mjsunit/manual-parallel-recompile.js +++ b/test/mjsunit/manual-parallel-recompile.js @@ -28,6 +28,11 @@ // Flags: --allow-natives-syntax --expose-gc // Flags: --parallel-recompilation --parallel-recompilation-delay=50 +if (!%IsParallelRecompilationSupported()) { + print("Parallel recompilation is disabled. Skipping this test."); + quit(); +} + function assertUnoptimized(fun) { assertTrue(%GetOptimizationStatus(fun) != 1); } @@ -60,10 +65,8 @@ assertUnoptimized(g); %OptimizeFunctionOnNextCall(g, "parallel"); f(g(2)); // Trigger optimization. -if (%IsParallelRecompilationSupported()) { - assertUnoptimized(f); // Not yet optimized. - assertUnoptimized(g); -} +assertUnoptimized(f); // Not yet optimized. +assertUnoptimized(g); %CompleteOptimization(f); // Wait till optimized code is installed. %CompleteOptimization(g); diff --git a/test/mjsunit/parallel-initial-prototype-change.js b/test/mjsunit/parallel-initial-prototype-change.js index 5544bebc1d..9f698bae63 100644 --- a/test/mjsunit/parallel-initial-prototype-change.js +++ b/test/mjsunit/parallel-initial-prototype-change.js @@ -28,6 +28,11 @@ // Flags: --allow-natives-syntax // Flags: --parallel-recompilation --parallel-recompilation-delay=50 +if (!%IsParallelRecompilationSupported()) { + print("Parallel recompilation is disabled. Skipping this test."); + quit(); +} + function assertUnoptimized(fun) { assertTrue(%GetOptimizationStatus(fun) != 1); } diff --git a/test/mjsunit/parallel-invalidate-transition-map.js b/test/mjsunit/parallel-invalidate-transition-map.js index 42a266f556..2a2276f1e2 100644 --- a/test/mjsunit/parallel-invalidate-transition-map.js +++ b/test/mjsunit/parallel-invalidate-transition-map.js @@ -28,6 +28,11 @@ // Flags: --track-fields --track-double-fields --allow-natives-syntax // Flags: --parallel-recompilation --parallel-recompilation-delay=50 +if (!%IsParallelRecompilationSupported()) { + print("Parallel recompilation is disabled. Skipping this test."); + quit(); +} + function assertUnoptimized(fun) { assertTrue(%GetOptimizationStatus(fun) != 1); } diff --git a/test/mjsunit/parallel-optimize-disabled.js b/test/mjsunit/parallel-optimize-disabled.js index 479684d407..b56303e08f 100644 --- a/test/mjsunit/parallel-optimize-disabled.js +++ b/test/mjsunit/parallel-optimize-disabled.js @@ -28,6 +28,11 @@ // Flags: --nodead-code-elimination --parallel-recompilation // Flags: --allow-natives-syntax +if (!%IsParallelRecompilationSupported()) { + print("Parallel recompilation is disabled. Skipping this test."); + quit(); +} + function g() { // g() cannot be optimized. const x = 1; x++;