summaryrefslogtreecommitdiff
path: root/scripts/fuzz_opt.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/fuzz_opt.py')
-rwxr-xr-xscripts/fuzz_opt.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py
index 145a2c543..4f35a1a77 100755
--- a/scripts/fuzz_opt.py
+++ b/scripts/fuzz_opt.py
@@ -118,6 +118,7 @@ FUZZ_OPTS = None
NANS = None
OOB = None
LEGALIZE = None
+ORIGINAL_V8_OPTS = shared.V8_OPTS[:]
def randomize_fuzz_settings():
@@ -138,7 +139,23 @@ def randomize_fuzz_settings():
FUZZ_OPTS += ['--legalize-js-interface']
else:
LEGALIZE = False
- print('randomized settings (NaNs, OOB, legalize):', NANS, OOB, LEGALIZE)
+ extra_v8_opts = []
+ # 50% of the time test v8 normally, that is, the same way it runs in
+ # production (which as of 07/15/2020 means baseline, then tier up to
+ # optimizing, but that may change in the future).
+ if random.random() < 0.5:
+ # test either the optimizing compiler or the baseline compiler, with
+ # equal probability. it's useful to do this because the normal tier-up
+ # mode does not check them both equally (typically baseline does not get
+ # enough testing, as we quickly leave it), and also because the tiering
+ # up is nondeterministic (when optimized code becomes ready, we switch
+ # to it)
+ if random.random() < 0.5:
+ extra_v8_opts += ['--no-liftoff']
+ else:
+ extra_v8_opts += ['--liftoff', '--no-wasm-tier-up']
+ shared.V8_OPTS = ORIGINAL_V8_OPTS + extra_v8_opts
+ print('randomized settings (NaNs, OOB, legalize, extra V8_OPTS):', NANS, OOB, LEGALIZE, extra_v8_opts)
# Test outputs we want to ignore are marked this way.