Commit 93bfaa17 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[test] Enable passing the thread-pool size to d8

This will enable some fuzzers to alter the thread-pool size.

Bug: v8:7455
Change-Id: Ic9c9600cdb3dc50e860dbda8432a23bb20f1dd44
Reviewed-on: https://chromium-review.googlesource.com/924273Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51335}
parent a840f1f8
...@@ -2898,6 +2898,9 @@ bool Shell::SetOptions(int argc, char* argv[]) { ...@@ -2898,6 +2898,9 @@ bool Shell::SetOptions(int argc, char* argv[]) {
} else if (strcmp(argv[i], "--quiet-load") == 0) { } else if (strcmp(argv[i], "--quiet-load") == 0) {
options.quiet_load = true; options.quiet_load = true;
argv[i] = nullptr; argv[i] = nullptr;
} else if (strncmp(argv[i], "--thread-pool-size=", 19) == 0) {
options.thread_pool_size = atoi(argv[i] + 19);
argv[i] = nullptr;
} }
} }
...@@ -3326,8 +3329,8 @@ int Shell::Main(int argc, char* argv[]) { ...@@ -3326,8 +3329,8 @@ int Shell::Main(int argc, char* argv[]) {
platform::tracing::TracingController* tracing_controller = tracing.get(); platform::tracing::TracingController* tracing_controller = tracing.get();
g_platform = v8::platform::NewDefaultPlatform( g_platform = v8::platform::NewDefaultPlatform(
0, v8::platform::IdleTaskSupport::kEnabled, in_process_stack_dumping, options.thread_pool_size, v8::platform::IdleTaskSupport::kEnabled,
std::move(tracing)); in_process_stack_dumping, std::move(tracing));
if (i::FLAG_verify_predictable) { if (i::FLAG_verify_predictable) {
g_platform.reset(new PredictablePlatform(std::move(g_platform))); g_platform.reset(new PredictablePlatform(std::move(g_platform)));
} }
......
...@@ -351,6 +351,7 @@ class ShellOptions { ...@@ -351,6 +351,7 @@ class ShellOptions {
int read_from_tcp_port; int read_from_tcp_port;
bool enable_os_system = false; bool enable_os_system = false;
bool quiet_load = false; bool quiet_load = false;
int thread_pool_size = 0;
}; };
class Shell : public i::AllStatic { class Shell : public i::AllStatic {
......
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