2016-08-04 14:41:09 +00:00
|
|
|
# Copyright 2016 the V8 project authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
# Use this to run several variants of the tests.
|
|
|
|
ALL_VARIANT_FLAGS = {
|
2019-07-12 13:50:04 +00:00
|
|
|
"assert_types": [["--assert-types"]],
|
2018-02-12 12:09:48 +00:00
|
|
|
"code_serializer": [["--cache=code"]],
|
2016-08-04 14:41:09 +00:00
|
|
|
"default": [[]],
|
2017-11-20 12:43:01 +00:00
|
|
|
"future": [["--future"]],
|
2019-04-03 10:11:59 +00:00
|
|
|
"gc_stats": [["--gc-stats=1"]],
|
2018-01-15 09:45:38 +00:00
|
|
|
# Alias of exhaustive variants, but triggering new test framework features.
|
|
|
|
"infra_staging": [[]],
|
2019-01-24 18:04:42 +00:00
|
|
|
"interpreted_regexp": [["--regexp-interpret-all"]],
|
2020-08-10 12:47:40 +00:00
|
|
|
"experimental_regexp": [["--enable-experimental-regexp-engine"]],
|
2019-02-04 10:24:00 +00:00
|
|
|
"jitless": [["--jitless"]],
|
2017-11-30 09:33:05 +00:00
|
|
|
"minor_mc": [["--minor-mc"]],
|
2020-05-13 06:54:21 +00:00
|
|
|
"nci": [["--turbo-nci"]],
|
2020-08-20 12:12:19 +00:00
|
|
|
"nci_as_midtier": [["--turbo-nci-as-midtier"]],
|
2020-02-17 15:17:14 +00:00
|
|
|
"no_lfa": [["--no-lazy-feedback-allocation"]],
|
2020-09-14 08:57:05 +00:00
|
|
|
"no_local_heaps": [[
|
|
|
|
"--no-local-heaps",
|
|
|
|
"--no-turbo-direct-heap-access",
|
|
|
|
"--no-finalize-streaming-on-background"]],
|
2017-04-28 13:33:43 +00:00
|
|
|
# No optimization means disable all optimizations. OptimizeFunctionOnNextCall
|
|
|
|
# would not force optimization too. It turns into a Nop. Please see
|
|
|
|
# https://chromium-review.googlesource.com/c/452620/ for more discussion.
|
2019-04-09 13:00:38 +00:00
|
|
|
# For WebAssembly, we test "Liftoff-only" in the nooptimization variant and
|
|
|
|
# "TurboFan-only" in the stress variant. The WebAssembly configuration is
|
|
|
|
# independent of JS optimizations, so we can combine those configs.
|
|
|
|
"nooptimization": [["--no-opt", "--liftoff", "--no-wasm-tier-up"]],
|
2018-01-15 09:45:38 +00:00
|
|
|
"slow_path": [["--force-slow-path"]],
|
2020-09-16 15:30:40 +00:00
|
|
|
"stress": [["--stress-opt", "--no-liftoff", "--stress-lazy-source-positions"]],
|
2020-09-14 07:19:59 +00:00
|
|
|
"stress_concurrent_allocation": [["--stress-concurrent-allocation"]],
|
2019-05-02 09:16:12 +00:00
|
|
|
"stress_js_bg_compile_wasm_code_gc": [["--stress-background-compile",
|
|
|
|
"--stress-wasm-code-gc"]],
|
2019-11-06 10:29:34 +00:00
|
|
|
"stress_incremental_marking": [["--stress-incremental-marking"]],
|
2020-05-04 07:01:25 +00:00
|
|
|
"stress_snapshot": [["--stress-snapshot"]],
|
2018-01-12 10:32:33 +00:00
|
|
|
# Trigger stress sampling allocation profiler with sample interval = 2^14
|
|
|
|
"stress_sampling": [["--stress-sampling-allocation-profiler=16384"]],
|
2018-01-05 09:41:12 +00:00
|
|
|
"trusted": [["--no-untrusted-code-mitigations"]],
|
2018-05-07 23:38:47 +00:00
|
|
|
"no_wasm_traps": [["--no-wasm-trap-handler"]],
|
2019-09-06 15:50:41 +00:00
|
|
|
"turboprop": [["--turboprop"]],
|
2019-11-06 10:29:34 +00:00
|
|
|
"instruction_scheduling": [["--turbo-instruction-scheduling"]],
|
|
|
|
"stress_instruction_scheduling": [["--turbo-stress-instruction-scheduling"]],
|
2019-09-20 13:32:43 +00:00
|
|
|
"top_level_await": [["--harmony-top-level-await"]],
|
2016-08-04 14:41:09 +00:00
|
|
|
}
|
|
|
|
|
2020-09-16 15:30:40 +00:00
|
|
|
# Flags that lead to a contradiction with the flags provided by the respective
|
|
|
|
# variant. This depends on the flags specified in ALL_VARIANT_FLAGS and on the
|
|
|
|
# implications defined in flag-definitions.h.
|
|
|
|
INCOMPATIBLE_FLAGS_PER_VARIANT = {
|
|
|
|
"assert_types": ["--no-assert-types"],
|
|
|
|
"jitless": ["--opt", "--liftoff", "--track-field-types", "--validate-asm"],
|
|
|
|
"no_wasm_traps": ["--wasm-trap-handler"],
|
|
|
|
"nooptimization": ["--opt", "--no-liftoff", "--predictable", "--wasm-tier-up"],
|
|
|
|
"slow_path": ["--no-force-slow-path"],
|
|
|
|
"stress_incremental_marking": ["--no-stress-incremental-marking"],
|
|
|
|
"stress_js_bg_compile_wasm_code_gc": ["--no-stress-background-compile"],
|
|
|
|
"stress": ["--no-stress-opt", "--always-opt", "--no-always-opt", "--liftoff", "--max-inlined-bytecode-size=*",
|
|
|
|
"--max-inlined-bytecode-size-cumulative=*", "--stress-inline"],
|
|
|
|
"turboprop": ["--turbo-inlining", "--interrupt-budget=*", "--no-turboprop"],
|
|
|
|
"code_serializer": ["--cache=after-execute", "--cache=full-code-cache", "--cache=none"],
|
|
|
|
"no_local_heaps": ["--concurrent-inlining", "--turboprop", ],
|
|
|
|
}
|
|
|
|
|
|
|
|
# Flags that lead to a contradiction under certain build variables.
|
|
|
|
# This corresponds to the build variables usable in status files as generated
|
|
|
|
# in _get_statusfile_variables in base_runner.py.
|
|
|
|
# The conflicts might be directly contradictory flags or be caused by the
|
|
|
|
# implications defined in flag-definitions.h.
|
|
|
|
INCOMPATIBLE_FLAGS_PER_BUILD_VARIABLE = {
|
|
|
|
"lite_mode": ["--no-lazy-feedback-allocation", "--max-semi-space-size=*"]
|
|
|
|
+ INCOMPATIBLE_FLAGS_PER_VARIANT["jitless"],
|
|
|
|
"predictable": ["--liftoff", "--parallel-compile-tasks",
|
|
|
|
"--concurrent-recompilation",
|
|
|
|
"--wasm-num-compilation-tasks=*"],
|
|
|
|
}
|
|
|
|
|
|
|
|
# Flags that lead to a contradiction when a certain extra-flag is present.
|
|
|
|
# Such extra-flags are defined for example in infra/testing/builders.pyl or in
|
|
|
|
# standard_runner.py.
|
|
|
|
# The conflicts might be directly contradictory flags or be caused by the
|
|
|
|
# implications defined in flag-definitions.h.
|
|
|
|
INCOMPATIBLE_FLAGS_PER_EXTRA_FLAG = {
|
|
|
|
"--concurrent-recompilation": ["--no-concurrent-recompilation", "--predictable"],
|
|
|
|
"--enable-armv8": ["--no-enable-armv8"],
|
|
|
|
"--gc-interval=*": ["--gc-interval=*"],
|
|
|
|
"--no-enable-sse3": ["--enable-sse3"],
|
|
|
|
"--no-enable-sse4-1": ["--enable-sse4-1"],
|
|
|
|
"--optimize-for-size": ["--max-semi-space-size=*"],
|
|
|
|
"--stress-flush-bytecode": ["--no-stress-flush-bytecode"],
|
|
|
|
"--stress-incremental-marking": INCOMPATIBLE_FLAGS_PER_VARIANT["stress_incremental_marking"],
|
|
|
|
}
|
|
|
|
|
2018-01-26 13:41:12 +00:00
|
|
|
SLOW_VARIANTS = set([
|
|
|
|
'stress',
|
2020-05-04 07:01:25 +00:00
|
|
|
'stress_snapshot',
|
2018-01-26 13:41:12 +00:00
|
|
|
'nooptimization',
|
|
|
|
])
|
|
|
|
|
|
|
|
FAST_VARIANTS = set([
|
|
|
|
'default'
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
def _variant_order_key(v):
|
|
|
|
if v in SLOW_VARIANTS:
|
|
|
|
return 0
|
|
|
|
if v in FAST_VARIANTS:
|
|
|
|
return 100
|
|
|
|
return 50
|
|
|
|
|
|
|
|
ALL_VARIANTS = sorted(ALL_VARIANT_FLAGS.keys(),
|
|
|
|
key=_variant_order_key)
|
|
|
|
|
|
|
|
# Check {SLOW,FAST}_VARIANTS entries
|
|
|
|
for variants in [SLOW_VARIANTS, FAST_VARIANTS]:
|
|
|
|
for v in variants:
|
|
|
|
assert v in ALL_VARIANT_FLAGS
|