author | Ryan VanderMeulen <ryanvm@gmail.com> |
Thu, 05 Dec 2013 15:58:44 -0500 | |
changeset 173772 | 20e4d6b3c819cdf36a25dc253217d55611104db2 |
parent 173771 | a3f7a5b3bb3a099b521d5050a044f64e5e52e494 |
child 173773 | 54405d36e0fbc3b0151404accdc09efb05d4e147 |
push id | 3224 |
push user | lsblakk@mozilla.com |
push date | Tue, 04 Feb 2014 01:06:49 +0000 |
treeherder | mozilla-beta@60c04d0987f1 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
bugs | 927685 |
milestone | 28.0a1 |
backs out | c63eaabaefb176376dc71a598eb7a1d47a08772b c14453ff87648f20be5b3805695d16257fd08212 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/js/src/jit-test/jit_test.py +++ b/js/src/jit-test/jit_test.py @@ -10,17 +10,16 @@ def add_libdir_to_path(): js_src_dir = dirname(dirname(realpath(sys.argv[0]))) assert exists(join(js_src_dir,'jsapi.h')) sys.path.insert(0, join(js_src_dir, 'lib')) sys.path.insert(0, join(js_src_dir, 'tests', 'lib')) add_libdir_to_path() import jittests -from tests import TBPL_FLAGS def main(argv): # If no multiprocessing is available, fallback to serial test execution max_jobs_default = 1 if jittests.HAVE_MULTIPROCESSING: try: max_jobs_default = jittests.cpu_count() @@ -157,18 +156,27 @@ def main(argv): if not options.run_slow: test_list = [ _ for _ in test_list if not _.slow ] # The full test list is ready. Now create copies for each JIT configuration. job_list = [] if options.tbpl: # Running all bits would take forever. Instead, we test a few interesting combinations. + flags = [ + [], # no flags, normal baseline and ion + ['--ion-eager'], # implies --baseline-eager + ['--ion-eager', '--ion-check-range-analysis', '--no-sse3'], + ['--baseline-eager'], + ['--baseline-eager', '--no-ti', '--no-fpu'], + ['--no-baseline', '--no-ion'], + ['--no-baseline', '--no-ion', '--no-ti'], + ] for test in test_list: - for variant in TBPL_FLAGS: + for variant in flags: new_test = test.copy() new_test.jitflags.extend(variant) job_list.append(new_test) elif options.ion: flags = [['--baseline-eager'], ['--ion-eager']] for test in test_list: for variant in flags: new_test = test.copy()
--- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -5519,26 +5519,35 @@ ProcessArgs(JSContext *cx, JSObject *obj } if (op->getBoolOption("ion-eager")) jit::js_IonOptions.setEagerCompilation(); if (op->getBoolOption("ion-compile-try-catch")) jit::js_IonOptions.compileTryCatch = true; - bool parallelCompilation = true; +#ifdef JS_THREADSAFE + bool parallelCompilation = false; if (const char *str = op->getStringOption("ion-parallel-compile")) { - if (strcmp(str, "off") == 0) - parallelCompilation = false; - else if (strcmp(str, "on") != 0) + if (strcmp(str, "on") == 0) { + if (cx->runtime()->workerThreadCount() == 0) { + fprintf(stderr, "Parallel compilation not available without helper threads"); + return EXIT_FAILURE; + } + parallelCompilation = true; + } else if (strcmp(str, "off") != 0) { return OptionFailure("ion-parallel-compile", str); - } -#ifdef JS_THREADSAFE + } + } + /* + * Note: In shell builds, parallel compilation is only enabled with an + * explicit option. + */ cx->runtime()->setParallelIonCompilationEnabled(parallelCompilation); -#endif +#endif /* JS_THREADSAFE */ #endif /* JS_ION */ #ifdef DEBUG if (op->getBoolOption("dump-entrained-variables")) dumpEntrainedVariables = true; #endif @@ -5781,18 +5790,20 @@ main(int argc, char **argv, char **envp) "(default: 1000)", -1) || !op.addStringOption('\0', "ion-regalloc", "[mode]", "Specify Ion register allocation:\n" " lsra: Linear Scan register allocation (default)\n" " backtracking: Priority based backtracking register allocation\n" " stupid: Simple block local register allocation") || !op.addBoolOption('\0', "ion-eager", "Always ion-compile methods (implies --baseline-eager)") || !op.addBoolOption('\0', "ion-compile-try-catch", "Ion-compile try-catch statements") +#ifdef JS_THREADSAFE || !op.addStringOption('\0', "ion-parallel-compile", "on/off", "Compile scripts off thread (default: off)") +#endif || !op.addBoolOption('\0', "baseline", "Enable baseline compiler (default)") || !op.addBoolOption('\0', "no-baseline", "Disable baseline compiler") || !op.addBoolOption('\0', "baseline-eager", "Always baseline-compile methods") || !op.addIntOption('\0', "baseline-uses-before-compile", "COUNT", "Wait for COUNT calls or iterations before baseline-compiling " "(default: 10)", -1) || !op.addBoolOption('\0', "no-fpu", "Pretend CPU does not support floating-point operations " "to test JIT codegen (no-op on platforms other than x86).")
--- a/js/src/tests/jstests.py +++ b/js/src/tests/jstests.py @@ -6,17 +6,17 @@ See the adjacent README.txt for more det """ import os, sys, textwrap from os.path import abspath, dirname, realpath from copy import copy from subprocess import list2cmdline, call from lib.results import NullTestOutput -from lib.tests import TestCase, TBPL_FLAGS +from lib.tests import TestCase from lib.results import ResultsSink from lib.progressbar import ProgressBar if (sys.platform.startswith('linux') or sys.platform.startswith('darwin') ): from lib.tasks_unix import run_all_tests else: @@ -81,19 +81,18 @@ def parse_args(): harness_og = OptionGroup(op, "Harness Controls", "Control how tests are run.") harness_og.add_option('-j', '--worker-count', type=int, default=max(1, get_cpu_count()), help='Number of tests to run in parallel (default %default)') harness_og.add_option('-t', '--timeout', type=float, default=150.0, help='Set maximum time a test is allows to run (in seconds).') harness_og.add_option('-a', '--args', dest='shell_args', default='', help='Extra args to pass to the JS shell.') - harness_og.add_option('--jitflags', default='', help="Obsolete. Does nothing.") - harness_og.add_option('--tbpl', action='store_true', - help='Runs each test in all configurations tbpl tests.') + harness_og.add_option('--jitflags', default='', + help='Example: --jitflags=m,amd to run each test with -m, -a -m -d [default=%default]') harness_og.add_option('-g', '--debug', action='store_true', help='Run a test in debugger.') harness_og.add_option('--debugger', default='gdb -q --args', help='Debugger command.') harness_og.add_option('-J', '--jorendb', action='store_true', help='Run under JS debugger.') harness_og.add_option('--passthrough', action='store_true', help='Run tests with stdin/stdout attached to caller.') harness_og.add_option('--valgrind', action='store_true', help='Run tests in valgrind.') harness_og.add_option('--valgrind-args', default='', help='Extra args to pass to valgrind.') op.add_option_group(harness_og) @@ -202,16 +201,26 @@ def parse_args(): # Hide the progress bar if it will get in the way of other output. options.hide_progress = (options.tinderbox or not ProgressBar.conservative_isatty() or options.hide_progress) return (options, requested_paths, excluded_paths) +def parse_jitflags(op_jitflags): + jitflags = [ [ '-' + flag for flag in flags ] + for flags in op_jitflags.split(',') ] + for flags in jitflags: + for flag in flags: + if flag not in ('-m', '-a', '-p', '-d', '-n'): + print('Invalid jit flag: "%s"'%flag) + sys.exit(1) + return jitflags + def load_tests(options, requested_paths, excluded_paths): """ Returns a tuple: (skipped_tests, test_list) skip_list: [iterable<Test>] Tests found but skipped. test_list: [iterable<Test>] Tests found that should be run. """ import lib.manifest as manifest @@ -229,31 +238,28 @@ def load_tests(options, requested_paths, test_dir = dirname(abspath(__file__)) test_list = manifest.load(test_dir, xul_tester) skip_list = [] if options.make_manifests: manifest.make_manifests(options.make_manifests, test_list) sys.exit() - # Create a new test list. Apply each TBPL configuration to every test. - if options.tbpl: + # Create a new test list. Apply each JIT configuration to every test. + if options.jitflags: new_test_list = [] - flags_list = TBPL_FLAGS + jitflags_list = parse_jitflags(options.jitflags) for test in test_list: - for jitflags in flags_list: + for jitflags in jitflags_list: tmp_test = copy(test) tmp_test.options = copy(test.options) tmp_test.options.extend(jitflags) new_test_list.append(tmp_test) test_list = new_test_list - if options.jitflags: - print("Warning: the --jitflags option is obsolete and does nothing now.") - if options.test_file: paths = set() for test_file in options.test_file: paths |= set([ line.strip() for line in open(test_file).readlines()]) test_list = [ _ for _ in test_list if _.path in paths ] if requested_paths: def p(path):
--- a/js/src/tests/lib/tests.py +++ b/js/src/tests/lib/tests.py @@ -4,27 +4,16 @@ # metadata, and know how to run the tests and determine failures. import datetime, os, sys, time from subprocess import Popen, PIPE from threading import Thread from results import TestOutput -# When run on tbpl, we run each test multiple times with the following arguments. -TBPL_FLAGS = [ - [], # no flags, normal baseline and ion - ['--ion-eager', '--ion-parallel-compile=off'], # implies --baseline-eager - ['--ion-eager', '--ion-parallel-compile=off', '--ion-check-range-analysis', '--no-sse3'], - ['--baseline-eager'], - ['--baseline-eager', '--no-ti', '--no-fpu'], - ['--no-baseline', '--no-ion'], - ['--no-baseline', '--no-ion', '--no-ti'], -] - def do_run_cmd(cmd): l = [ None, None ] th_run_cmd(cmd, l) return l[1] def set_limits(): # resource module not supported on all platforms try: