• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2016 the V8 project authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5# Use this to run several variants of the tests.
6ALL_VARIANT_FLAGS = {
7  "code_serializer": [["--cache=code"]],
8  "default": [[]],
9  "future": [["--future"]],
10  "gc_stats": [["--gc_stats=1"]],
11  # Alias of exhaustive variants, but triggering new test framework features.
12  "infra_staging": [[]],
13  "no_liftoff": [["--no-wasm-tier-up"]],
14  "minor_mc": [["--minor-mc"]],
15  # No optimization means disable all optimizations. OptimizeFunctionOnNextCall
16  # would not force optimization too. It turns into a Nop. Please see
17  # https://chromium-review.googlesource.com/c/452620/ for more discussion.
18  "nooptimization": [["--noopt"]],
19  "slow_path": [["--force-slow-path"]],
20  "stress": [["--stress-opt", "--always-opt"]],
21  "stress_background_compile": [["--stress-background-compile"]],
22  "stress_incremental_marking":  [["--stress-incremental-marking"]],
23  # Trigger stress sampling allocation profiler with sample interval = 2^14
24  "stress_sampling": [["--stress-sampling-allocation-profiler=16384"]],
25  "trusted": [["--no-untrusted-code-mitigations"]],
26  "no_wasm_traps": [["--no-wasm-trap-handler"]],
27}
28
29SLOW_VARIANTS = set([
30  'stress',
31  'nooptimization',
32])
33
34FAST_VARIANTS = set([
35  'default'
36])
37
38
39def _variant_order_key(v):
40  if v in SLOW_VARIANTS:
41    return 0
42  if v in FAST_VARIANTS:
43    return 100
44  return 50
45
46ALL_VARIANTS = sorted(ALL_VARIANT_FLAGS.keys(),
47                      key=_variant_order_key)
48
49# Check {SLOW,FAST}_VARIANTS entries
50for variants in [SLOW_VARIANTS, FAST_VARIANTS]:
51  for v in variants:
52    assert v in ALL_VARIANT_FLAGS
53