Commit 41285962 authored by Michael Achenbach's avatar Michael Achenbach Committed by V8 LUCI CQ

[numfuzz] Add an interrupt-budget fuzzer

This fuzzes more values of interrupt-budget on numfuzz. For now
as a single instance. In a follow up we add it also to combined
flags.

No-Try: true
Bug: v8:12434
Change-Id: I836c5e829ffeabfa4a4686d4d3d2fd43fce1ee88
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3302797Reviewed-by: 's avatarAlmothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78107}
parent 1d6dc2b9
...@@ -2036,6 +2036,11 @@ ...@@ -2036,6 +2036,11 @@
'suffix': 'deopt', 'suffix': 'deopt',
'test_args': ['--total-timeout-sec=2100', '--stress-deopt=1'] 'test_args': ['--total-timeout-sec=2100', '--stress-deopt=1']
}, },
{
'name': 'numfuzz',
'suffix': 'interrupt',
'test_args': ['--total-timeout-sec=2100', '--stress-interrupt-budget=1']
},
], ],
}, },
'V8 NumFuzz - TSAN': { 'V8 NumFuzz - TSAN': {
...@@ -2059,6 +2064,11 @@ ...@@ -2059,6 +2064,11 @@
'suffix': 'delay', 'suffix': 'delay',
'test_args': ['--total-timeout-sec=2100', '--stress-delay-tasks=1'] 'test_args': ['--total-timeout-sec=2100', '--stress-delay-tasks=1']
}, },
{
'name': 'numfuzz',
'suffix': 'interrupt',
'test_args': ['--total-timeout-sec=2100', '--stress-interrupt-budget=1']
},
{ {
'name': 'numfuzz', 'name': 'numfuzz',
'suffix': 'threads', 'suffix': 'threads',
...@@ -2114,6 +2124,11 @@ ...@@ -2114,6 +2124,11 @@
'suffix': 'delay', 'suffix': 'delay',
'test_args': ['--total-timeout-sec=2100', '--stress-delay-tasks=1'] 'test_args': ['--total-timeout-sec=2100', '--stress-delay-tasks=1']
}, },
{
'name': 'numfuzz',
'suffix': 'interrupt',
'test_args': ['--total-timeout-sec=2100', '--stress-interrupt-budget=1']
},
{ {
'name': 'numfuzz', 'name': 'numfuzz',
'suffix': 'threads', 'suffix': 'threads',
...@@ -2163,6 +2178,11 @@ ...@@ -2163,6 +2178,11 @@
'suffix': 'deopt', 'suffix': 'deopt',
'test_args': ['--total-timeout-sec=900', '--stress-deopt=1'] 'test_args': ['--total-timeout-sec=900', '--stress-deopt=1']
}, },
{
'name': 'numfuzz',
'suffix': 'interrupt',
'test_args': ['--total-timeout-sec=900', '--stress-interrupt-budget=1']
},
], ],
}, },
'v8_numfuzz_tsan_ng_triggered': { 'v8_numfuzz_tsan_ng_triggered': {
...@@ -2180,6 +2200,11 @@ ...@@ -2180,6 +2200,11 @@
'suffix': 'delay', 'suffix': 'delay',
'test_args': ['--total-timeout-sec=900', '--stress-delay-tasks=1'] 'test_args': ['--total-timeout-sec=900', '--stress-delay-tasks=1']
}, },
{
'name': 'numfuzz',
'suffix': 'interrupt',
'test_args': ['--total-timeout-sec=900', '--stress-interrupt-budget=1']
},
{ {
'name': 'numfuzz', 'name': 'numfuzz',
'suffix': 'threads', 'suffix': 'threads',
...@@ -2227,6 +2252,11 @@ ...@@ -2227,6 +2252,11 @@
'suffix': 'delay', 'suffix': 'delay',
'test_args': ['--total-timeout-sec=900', '--stress-delay-tasks=1'] 'test_args': ['--total-timeout-sec=900', '--stress-delay-tasks=1']
}, },
{
'name': 'numfuzz',
'suffix': 'interrupt',
'test_args': ['--total-timeout-sec=900', '--stress-interrupt-budget=1']
},
{ {
'name': 'numfuzz', 'name': 'numfuzz',
'suffix': 'threads', 'suffix': 'threads',
......
...@@ -76,13 +76,16 @@ class NumFuzzer(base_runner.BaseTestRunner): ...@@ -76,13 +76,16 @@ class NumFuzzer(base_runner.BaseTestRunner):
help="probability [0-10] of adding --thread-pool-size " help="probability [0-10] of adding --thread-pool-size "
"flag to the test") "flag to the test")
# Stress deopt # Stress compiler
parser.add_option("--stress-deopt", default=0, type="int", parser.add_option("--stress-deopt", default=0, type="int",
help="probability [0-10] of adding --deopt-every-n-times " help="probability [0-10] of adding --deopt-every-n-times "
"flag to the test") "flag to the test")
parser.add_option("--stress-deopt-min", default=1, type="int", parser.add_option("--stress-deopt-min", default=1, type="int",
help="extends --stress-deopt to have minimum interval " help="extends --stress-deopt to have minimum interval "
"between deopt points") "between deopt points")
parser.add_option("--stress-interrupt-budget", default=0, type="int",
help="probability [0-10] of adding the --interrupt-budget "
"flag to the test")
# Combine multiple tests # Combine multiple tests
parser.add_option("--combine-tests", default=False, action="store_true", parser.add_option("--combine-tests", default=False, action="store_true",
......
...@@ -267,11 +267,22 @@ class CompactionFuzzer(Fuzzer): ...@@ -267,11 +267,22 @@ class CompactionFuzzer(Fuzzer):
while True: while True:
yield ['--stress-compaction-random'] yield ['--stress-compaction-random']
class InterruptBudgetFuzzer(Fuzzer):
def create_flags_generator(self, rng, test, analysis_value):
while True:
# Higher likelyhood for --no-lazy-feedback-allocation since some
# code paths for --interrupt-budget are tied to it.
flags = rng.choice([], [], ['--no-lazy-feedback-allocation'])
yield flags + ['--interrupt-budget=%d' % rng.randint(0, 135168)]
class StackSizeFuzzer(Fuzzer): class StackSizeFuzzer(Fuzzer):
def create_flags_generator(self, rng, test, analysis_value): def create_flags_generator(self, rng, test, analysis_value):
while True: while True:
yield ['--stack-size=%d' % rng.randint(54, 983)] yield ['--stack-size=%d' % rng.randint(54, 983)]
class TaskDelayFuzzer(Fuzzer): class TaskDelayFuzzer(Fuzzer):
def create_flags_generator(self, rng, test, analysis_value): def create_flags_generator(self, rng, test, analysis_value):
while True: while True:
...@@ -326,6 +337,7 @@ FUZZERS = { ...@@ -326,6 +337,7 @@ FUZZERS = {
'delay': (None, TaskDelayFuzzer), 'delay': (None, TaskDelayFuzzer),
'deopt': (DeoptAnalyzer, DeoptFuzzer), 'deopt': (DeoptAnalyzer, DeoptFuzzer),
'gc_interval': (GcIntervalAnalyzer, GcIntervalFuzzer), 'gc_interval': (GcIntervalAnalyzer, GcIntervalFuzzer),
'interrupt': InterruptBudgetFuzzer,
'marking': (MarkingAnalyzer, MarkingFuzzer), 'marking': (MarkingAnalyzer, MarkingFuzzer),
'scavenge': (ScavengeAnalyzer, ScavengeFuzzer), 'scavenge': (ScavengeAnalyzer, ScavengeFuzzer),
'stack': (None, StackSizeFuzzer), 'stack': (None, StackSizeFuzzer),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment