mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 927685 - Enable --ion-parallel-compile=on by default in the shell; r=jandem,sr=jorendorff
* * * Bug 927685 - Followup to fix bustage in --disable-threadsafe builds on a CLOSED TREE; r=bustage --HG-- extra : rebase_source : b6f59f7f173e0e7c34b60cd0268cc9c36a0f485a
This commit is contained in:
parent
04f9ededc7
commit
e54883a1d8
@ -15,6 +15,7 @@ def add_libdir_to_path():
|
||||
add_libdir_to_path()
|
||||
|
||||
import jittests
|
||||
from tests import TBPL_FLAGS
|
||||
|
||||
def main(argv):
|
||||
|
||||
@ -161,17 +162,8 @@ def main(argv):
|
||||
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 flags:
|
||||
for variant in TBPL_FLAGS:
|
||||
new_test = test.copy()
|
||||
new_test.jitflags.extend(variant)
|
||||
job_list.append(new_test)
|
||||
|
@ -5567,25 +5567,16 @@ ProcessArgs(JSContext *cx, JSObject *obj_, OptionParser *op)
|
||||
if (op->getBoolOption("ion-compile-try-catch"))
|
||||
jit::js_IonOptions.compileTryCatch = true;
|
||||
|
||||
#ifdef JS_THREADSAFE
|
||||
bool parallelCompilation = false;
|
||||
bool parallelCompilation = true;
|
||||
if (const char *str = op->getStringOption("ion-parallel-compile")) {
|
||||
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) {
|
||||
if (strcmp(str, "off") == 0)
|
||||
parallelCompilation = false;
|
||||
else if (strcmp(str, "on") != 0)
|
||||
return OptionFailure("ion-parallel-compile", str);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Note: In shell builds, parallel compilation is only enabled with an
|
||||
* explicit option.
|
||||
*/
|
||||
#ifdef JS_THREADSAFE
|
||||
cx->runtime()->setParallelIonCompilationEnabled(parallelCompilation);
|
||||
#endif /* JS_THREADSAFE */
|
||||
#endif
|
||||
|
||||
#endif /* JS_ION */
|
||||
|
||||
@ -5838,10 +5829,8 @@ main(int argc, char **argv, char **envp)
|
||||
" 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")
|
||||
|
@ -11,7 +11,7 @@ from copy import copy
|
||||
from subprocess import list2cmdline, call
|
||||
|
||||
from lib.results import NullTestOutput
|
||||
from lib.tests import TestCase
|
||||
from lib.tests import TestCase, TBPL_FLAGS
|
||||
from lib.results import ResultsSink
|
||||
from lib.progressbar import ProgressBar
|
||||
|
||||
@ -86,8 +86,9 @@ def parse_args():
|
||||
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='Example: --jitflags=m,amd to run each test with -m, -a -m -d [default=%default]')
|
||||
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('-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.')
|
||||
@ -206,16 +207,6 @@ def parse_args():
|
||||
|
||||
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)
|
||||
@ -243,18 +234,21 @@ def load_tests(options, requested_paths, excluded_paths):
|
||||
manifest.make_manifests(options.make_manifests, test_list)
|
||||
sys.exit()
|
||||
|
||||
# Create a new test list. Apply each JIT configuration to every test.
|
||||
if options.jitflags:
|
||||
# Create a new test list. Apply each TBPL configuration to every test.
|
||||
if options.tbpl:
|
||||
new_test_list = []
|
||||
jitflags_list = parse_jitflags(options.jitflags)
|
||||
flags_list = TBPL_FLAGS
|
||||
for test in test_list:
|
||||
for jitflags in jitflags_list:
|
||||
for jitflags in flags_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:
|
||||
|
@ -9,6 +9,17 @@ 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)
|
||||
|
Loading…
Reference in New Issue
Block a user