Add stack size option to fuzzer
Bug: v8:11826 Change-Id: I30a582351305e1548948086709fc9ba0b0a91bd8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3069286 Reviewed-by: Michael Achenbach <machenbach@chromium.org> Reviewed-by: Liviu Rau <liviurau@chromium.org> Commit-Queue: Almothana Athamneh <almuthanna@chromium.org> Cr-Commit-Position: refs/heads/master@{#76345}
This commit is contained in:
parent
6ae18c2d3c
commit
1f83d4d8f4
@ -63,6 +63,11 @@ class NumFuzzer(base_runner.BaseTestRunner):
|
||||
help="probability [0-10] of adding --random-gc-interval "
|
||||
"flag to the test")
|
||||
|
||||
# Stress stack size
|
||||
parser.add_option("--stress-stack-size", default=0, type="int",
|
||||
help="probability [0-10] of adding --stack-size "
|
||||
"flag to the test")
|
||||
|
||||
# Stress tasks
|
||||
parser.add_option("--stress-delay-tasks", default=0, type="int",
|
||||
help="probability [0-10] of adding --stress-delay-tasks "
|
||||
@ -133,6 +138,7 @@ class NumFuzzer(base_runner.BaseTestRunner):
|
||||
options.stress_compaction,
|
||||
options.stress_gc,
|
||||
options.stress_delay_tasks,
|
||||
options.stress_stack_size,
|
||||
options.stress_thread_pool_size])),
|
||||
})
|
||||
return variables
|
||||
@ -221,6 +227,7 @@ class NumFuzzer(base_runner.BaseTestRunner):
|
||||
add('marking', options.stress_marking)
|
||||
add('scavenge', options.stress_scavenge)
|
||||
add('gc_interval', options.stress_gc)
|
||||
add('stack', options.stress_stack_size)
|
||||
add('threads', options.stress_thread_pool_size)
|
||||
add('delay', options.stress_delay_tasks)
|
||||
add('deopt', options.stress_deopt, options.stress_deopt_min)
|
||||
|
@ -265,6 +265,10 @@ class CompactionFuzzer(Fuzzer):
|
||||
while True:
|
||||
yield ['--stress-compaction-random']
|
||||
|
||||
class StackSizeFuzzer(Fuzzer):
|
||||
def create_flags_generator(self, rng, test, analysis_value):
|
||||
while True:
|
||||
yield ['--stack-size=%d' % rng.randint(50, 983)]
|
||||
|
||||
class TaskDelayFuzzer(Fuzzer):
|
||||
def create_flags_generator(self, rng, test, analysis_value):
|
||||
@ -322,6 +326,7 @@ FUZZERS = {
|
||||
'gc_interval': (GcIntervalAnalyzer, GcIntervalFuzzer),
|
||||
'marking': (MarkingAnalyzer, MarkingFuzzer),
|
||||
'scavenge': (ScavengeAnalyzer, ScavengeFuzzer),
|
||||
'stack': (None, StackSizeFuzzer),
|
||||
'threads': (None, ThreadPoolSizeFuzzer),
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user