Commit 667173aa authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[test] Add thread-pool-size numfuzzer

NOTRY=true

Bug: v8:7455
Change-Id: Icb82e8196bc16b4c8b0eebb3c5820e6b3d581735
Reviewed-on: https://chromium-review.googlesource.com/924309Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51336}
parent 93bfaa17
......@@ -55,6 +55,9 @@ class NumFuzzer(base_runner.BaseTestRunner):
parser.add_option("--stress-gc", default=0, type="int",
help="probability [0-10] of adding --random-gc-interval "
"flag to the test")
parser.add_option("--stress-thread-pool-size", default=0, type="int",
help="probability [0-10] of adding --thread-pool-size "
"flag to the test")
# Stress deopt
parser.add_option("--stress-deopt", default=0, type="int",
......@@ -117,7 +120,8 @@ class NumFuzzer(base_runner.BaseTestRunner):
'gc_fuzzer': bool(max([options.stress_marking,
options.stress_scavenge,
options.stress_compaction,
options.stress_gc])),
options.stress_gc,
options.stress_thread_pool_size])),
})
return variables
......@@ -208,6 +212,7 @@ class NumFuzzer(base_runner.BaseTestRunner):
add('marking', options.stress_marking)
add('scavenge', options.stress_scavenge)
add('gc_interval', options.stress_gc)
add('threads', options.stress_thread_pool_size)
add('interrupt_budget', options.stress_interrupt_budget)
add('deopt', options.stress_deopt, options.stress_deopt_min)
return fuzzers
......
......@@ -217,6 +217,12 @@ class CompactionFuzzer(Fuzzer):
yield ['--stress-compaction-random']
class ThreadPoolSizeFuzzer(Fuzzer):
def create_flags_generator(self, rng, test, analysis_value):
while True:
yield ['--thread-pool-size=%d' % rng.randint(1, 8)]
class InterruptBudgetFuzzer(Fuzzer):
def create_flags_generator(self, rng, test, analysis_value):
while True:
......@@ -268,6 +274,7 @@ FUZZERS = {
'interrupt_budget': (None, InterruptBudgetFuzzer),
'marking': (MarkingAnalyzer, MarkingFuzzer),
'scavenge': (ScavengeAnalyzer, ScavengeFuzzer),
'threads': (None, ThreadPoolSizeFuzzer),
}
......
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