Add infrastructure for skipping tests in GC stress mode.

Also move the GC stress configuration from the buildbot to the test runner.

BUG=
R=jkummerow@chromium.org, mvstanton@chromium.org

Review URL: https://codereview.chromium.org/141653008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18708 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 7b3b9bd3
...@@ -35,11 +35,6 @@ ...@@ -35,11 +35,6 @@
// in this test case. Depending on whether smi-only arrays are actually // in this test case. Depending on whether smi-only arrays are actually
// enabled, this test takes the appropriate code path to check smi-only arrays. // enabled, this test takes the appropriate code path to check smi-only arrays.
// Reset the GC stress mode to be off. Needed because AllocationMementos only
// live for one gc, so a gc that happens in certain fragile areas of the test
// can break assumptions.
%SetFlags("--gc-interval=-1")
// support_smi_only_arrays = %HasFastSmiElements(new Array(1,2,3,4,5,6,7,8)); // support_smi_only_arrays = %HasFastSmiElements(new Array(1,2,3,4,5,6,7,8));
support_smi_only_arrays = true; support_smi_only_arrays = true;
......
...@@ -35,11 +35,6 @@ ...@@ -35,11 +35,6 @@
// in this test case. Depending on whether smi-only arrays are actually // in this test case. Depending on whether smi-only arrays are actually
// enabled, this test takes the appropriate code path to check smi-only arrays. // enabled, this test takes the appropriate code path to check smi-only arrays.
// Reset the GC stress mode to be off. Needed because AllocationMementos only
// live for one gc, so a gc that happens in certain fragile areas of the test
// can break assumptions.
%SetFlags("--gc-interval=-1")
// support_smi_only_arrays = %HasFastSmiElements(new Array(1,2,3,4,5,6,7,8)); // support_smi_only_arrays = %HasFastSmiElements(new Array(1,2,3,4,5,6,7,8));
support_smi_only_arrays = true; support_smi_only_arrays = true;
......
...@@ -35,11 +35,6 @@ ...@@ -35,11 +35,6 @@
// in this test case. Depending on whether smi-only arrays are actually // in this test case. Depending on whether smi-only arrays are actually
// enabled, this test takes the appropriate code path to check smi-only arrays. // enabled, this test takes the appropriate code path to check smi-only arrays.
// Reset the GC stress mode to be off. Needed because AllocationMementos only
// live for one gc, so a gc that happens in certain fragile areas of the test
// can break assumptions.
%SetFlags("--gc-interval=-1")
// support_smi_only_arrays = %HasFastSmiElements(new Array(1,2,3,4,5,6,7,8)); // support_smi_only_arrays = %HasFastSmiElements(new Array(1,2,3,4,5,6,7,8));
support_smi_only_arrays = true; support_smi_only_arrays = true;
......
...@@ -35,11 +35,6 @@ ...@@ -35,11 +35,6 @@
// in this test case. Depending on whether smi-only arrays are actually // in this test case. Depending on whether smi-only arrays are actually
// enabled, this test takes the appropriate code path to check smi-only arrays. // enabled, this test takes the appropriate code path to check smi-only arrays.
// Reset the GC stress mode to be off. Needed because AllocationMementos only
// live for one gc, so a gc that happens in certain fragile areas of the test
// can break assumptions.
%SetFlags("--gc-interval=-1")
// support_smi_only_arrays = %HasFastSmiElements(new Array(1,2,3,4,5,6,7,8)); // support_smi_only_arrays = %HasFastSmiElements(new Array(1,2,3,4,5,6,7,8));
support_smi_only_arrays = true; support_smi_only_arrays = true;
......
...@@ -30,11 +30,6 @@ ...@@ -30,11 +30,6 @@
// Test the performance.now() function of d8. This test only makes sense with // Test the performance.now() function of d8. This test only makes sense with
// d8. // d8.
// Don't run this test in gc stress mode. Time differences may be long
// due to garbage collections.
%SetFlags("--gc-interval=-1");
%SetFlags("--nostress-compaction");
if (this.performance && performance.now) { if (this.performance && performance.now) {
(function run() { (function run() {
var start_test = performance.now(); var start_test = performance.now();
......
...@@ -25,8 +25,7 @@ ...@@ -25,8 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --smi-only-arrays --expose-gc // Flags: --allow-natives-syntax --smi-only-arrays --expose-gc --nostress-opt
// Flags: --nostress-opt --nostress-compaction --gc-interval=-1
// Test element kind of objects. // Test element kind of objects.
// Since --smi-only-arrays affects builtins, its default setting at compile // Since --smi-only-arrays affects builtins, its default setting at compile
......
...@@ -26,11 +26,6 @@ ...@@ -26,11 +26,6 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc // Flags: --allow-natives-syntax --expose-gc
// TODO(mstarzinger): This test does not succeed when GCs happen in
// between prototype transitions, we disable GC stress for now.
%SetFlags("--gc-interval=-1")
// Flags: --noincremental-marking // Flags: --noincremental-marking
// Check that objects that are used for prototypes are in the fast mode. // Check that objects that are used for prototypes are in the fast mode.
......
...@@ -104,14 +104,24 @@ ...@@ -104,14 +104,24 @@
# Tests verifying CHECK and ASSERT. # Tests verifying CHECK and ASSERT.
'verify-check-false': [FAIL, NO_VARIANTS], 'verify-check-false': [FAIL, NO_VARIANTS],
'verify-assert-false': [NO_VARIANTS, ['mode == release', PASS], ['mode == debug', FAIL]], 'verify-assert-false': [NO_VARIANTS, ['mode == release', PASS], ['mode == debug', FAIL]],
# TODO(machenbach): Temporarily marked as flaky until there is infrastructure
# to disable these tests on GC stress.
'elements-kind': [PASS, ['mode == debug and system == linux', FLAKY]],
'osr-elements-kind': [PASS, ['mode == debug and system == linux', FLAKY]],
'array-literal-feedback': [PASS, ['mode == debug and system == linux', FLAKY]],
}], # ALWAYS }], # ALWAYS
##############################################################################
['gc_stress == True', {
# Skip tests not suitable for GC stress.
'allocation-site-info': [SKIP],
'array-constructor-feedback': [SKIP],
'array-feedback': [SKIP],
'array-literal-feedback': [SKIP],
'd8-performance-now': [SKIP],
'elements-kind': [SKIP],
'fast-prototype': [SKIP],
'opt-elements-kind': [SKIP],
'osr-elements-kind': [SKIP],
'regress/regress-165637': [SKIP],
'regress/regress-2249': [SKIP],
}], # 'gc_stress == True'
############################################################################## ##############################################################################
['arch == arm or arch == android_arm', { ['arch == arm or arch == android_arm', {
......
...@@ -39,11 +39,6 @@ ...@@ -39,11 +39,6 @@
// in this test case. Depending on whether smi-only arrays are actually // in this test case. Depending on whether smi-only arrays are actually
// enabled, this test takes the appropriate code path to check smi-only arrays. // enabled, this test takes the appropriate code path to check smi-only arrays.
// Reset the GC stress mode to be off. Needed because AllocationMementos only
// live for one gc, so a gc that happens in certain fragile areas of the test
// can break assumptions.
%SetFlags("--gc-interval=-1")
support_smi_only_arrays = %HasFastSmiElements(new Array(1,2,3,4,5,6,7,8)); support_smi_only_arrays = %HasFastSmiElements(new Array(1,2,3,4,5,6,7,8));
if (support_smi_only_arrays) { if (support_smi_only_arrays) {
......
...@@ -39,11 +39,6 @@ ...@@ -39,11 +39,6 @@
// in this test case. Depending on whether smi-only arrays are actually // in this test case. Depending on whether smi-only arrays are actually
// enabled, this test takes the appropriate code path to check smi-only arrays. // enabled, this test takes the appropriate code path to check smi-only arrays.
// Reset the GC stress mode to be off. Needed because AllocationMementos only
// live for one gc, so a gc that happens in certain fragile areas of the test
// can break assumptions.
%SetFlags("--gc-interval=-1")
support_smi_only_arrays = %HasFastSmiElements(new Array(1,2,3,4,5,6,7,8)); support_smi_only_arrays = %HasFastSmiElements(new Array(1,2,3,4,5,6,7,8));
if (support_smi_only_arrays) { if (support_smi_only_arrays) {
......
...@@ -45,10 +45,6 @@ function do_slices() { ...@@ -45,10 +45,6 @@ function do_slices() {
return Date.now() - start; return Date.now() - start;
} }
// Reset the GC stress mode to be off. Needed so that the runtime of this test
// stays within bounds even if we run in GC stress mode.
%SetFlags("--gc-interval=-1 --noforce-marking-deque-overflows");
// Should never take more than 3 seconds (if the bug is fixed, the test takes // Should never take more than 3 seconds (if the bug is fixed, the test takes
// considerably less time than 3 seconds). // considerably less time than 3 seconds).
assertTrue(do_slices() < (3 * 1000)); assertTrue(do_slices() < (3 * 1000));
......
...@@ -363,12 +363,13 @@ def Execute(arch, mode, args, options, suites, workspace): ...@@ -363,12 +363,13 @@ def Execute(arch, mode, args, options, suites, workspace):
# Find available test suites and read test cases from them. # Find available test suites and read test cases from them.
variables = { variables = {
"mode": mode,
"arch": arch, "arch": arch,
"system": utils.GuessOS(),
"isolates": options.isolates,
"deopt_fuzzer": True, "deopt_fuzzer": True,
"gc_stress": False,
"isolates": options.isolates,
"mode": mode,
"no_i18n": False, "no_i18n": False,
"system": utils.GuessOS(),
} }
all_tests = [] all_tests = []
num_tests = 0 num_tests = 0
......
...@@ -68,6 +68,11 @@ MODE_FLAGS = { ...@@ -68,6 +68,11 @@ MODE_FLAGS = {
"release" : ["--nobreak-on-abort", "--nodead-code-elimination", "release" : ["--nobreak-on-abort", "--nodead-code-elimination",
"--nofold-constants"]} "--nofold-constants"]}
GC_STRESS_FLAGS = ["--gc-interval=500", "--stress-compaction",
"--concurrent-recompilation-queue-length=64",
"--concurrent-recompilation-delay=500",
"--concurrent-recompilation"]
SUPPORTED_ARCHS = ["android_arm", SUPPORTED_ARCHS = ["android_arm",
"android_ia32", "android_ia32",
"arm", "arm",
...@@ -108,6 +113,9 @@ def BuildOptions(): ...@@ -108,6 +113,9 @@ def BuildOptions():
result.add_option("--pass-fail-tests", result.add_option("--pass-fail-tests",
help="Regard pass|fail tests (run|skip|dontcare)", help="Regard pass|fail tests (run|skip|dontcare)",
default="dontcare") default="dontcare")
result.add_option("--gc-stress",
help="Switch on GC stress mode",
default=False, action="store_true")
result.add_option("--command-prefix", result.add_option("--command-prefix",
help="Prepended to each shell command used to run a test", help="Prepended to each shell command used to run a test",
default="") default="")
...@@ -220,6 +228,10 @@ def ProcessOptions(options): ...@@ -220,6 +228,10 @@ def ProcessOptions(options):
options.no_network = True options.no_network = True
options.command_prefix = shlex.split(options.command_prefix) options.command_prefix = shlex.split(options.command_prefix)
options.extra_flags = shlex.split(options.extra_flags) options.extra_flags = shlex.split(options.extra_flags)
if options.gc_stress:
options.extra_flags += GC_STRESS_FLAGS
if options.j == 0: if options.j == 0:
options.j = multiprocessing.cpu_count() options.j = multiprocessing.cpu_count()
...@@ -373,12 +385,13 @@ def Execute(arch, mode, args, options, suites, workspace): ...@@ -373,12 +385,13 @@ def Execute(arch, mode, args, options, suites, workspace):
# Find available test suites and read test cases from them. # Find available test suites and read test cases from them.
variables = { variables = {
"mode": mode,
"arch": arch, "arch": arch,
"system": utils.GuessOS(),
"isolates": options.isolates,
"deopt_fuzzer": False, "deopt_fuzzer": False,
"gc_stress": options.gc_stress,
"isolates": options.isolates,
"mode": mode,
"no_i18n": options.no_i18n, "no_i18n": options.no_i18n,
"system": utils.GuessOS(),
} }
all_tests = [] all_tests = []
num_tests = 0 num_tests = 0
......
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