| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent aebe624 commit 0d0c57f
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -99,6 +99,13 @@ Process v8 profiler output generated using the v8 option \fB\-\-prof\fR | |||
| 99 | 99 | .BR \-\-v8\-options | |
| 100 | 100 | Print v8 command line options. | |
| 101 | 101 | ||
| 102 | + .TP | ||
| 103 | + .BR \-\-v8\-pool\-size =\fInum\fR | ||
| 104 | + Set v8's thread pool size which will be used to allocate background jobs. | ||
| 105 | + If set to 0 then v8 will choose an appropriate size of the thread pool based | ||
| 106 | + on the number of online processors. If the value provided is larger than v8's | ||
| 107 | + max then the largest value will be chosen. | ||
| 108 | + | ||
| 102 | 109 | .TP | |
| 103 | 110 | .BR \-\-tls\-cipher\-list =\fIlist\fR | |
| 104 | 111 | Specify an alternative default TLS cipher list. (Requires Node.js to be built with crypto support. (Default)) | |
@@ -115,7 +122,6 @@ Force FIPS-compliant crypto on startup. (Cannot be disabled from script code.) ( | |||
| 115 | 122 | .BR \-\-icu\-data\-dir =\fIfile\fR | |
| 116 | 123 | Specify ICU data load path. (overrides \fBNODE_ICU_DATA\fR) | |
| 117 | 124 | ||
| 118 | - | ||
| 119 | 125 | .SH ENVIRONMENT VARIABLES | |
| 120 | 126 | ||
| 121 | 127 | .TP | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -145,6 +145,8 @@ static const char** preload_modules = nullptr; | |||
| 145 | 145 | static bool use_debug_agent = false; | |
| 146 | 146 | static bool debug_wait_connect = false; | |
| 147 | 147 | static int debug_port = 5858; | |
| 148 | + static const int v8_default_thread_pool_size = 4; | ||
| 149 | + static int v8_thread_pool_size = v8_default_thread_pool_size; | ||
| 148 | 150 | static bool prof_process = false; | |
| 149 | 151 | static bool v8_is_profiling = false; | |
| 150 | 152 | static bool node_is_initialized = false; | |
@@ -169,7 +171,6 @@ static uv_async_t dispatch_debug_messages_async; | |||
| 169 | 171 | static node::atomic<Isolate*> node_isolate; | |
| 170 | 172 | static v8::Platform* default_platform; | |
| 171 | 173 | ||
| 172 | - | ||
| 173 | 174 | static void PrintErrorString(const char* format, ...) { | |
| 174 | 175 | va_list ap; | |
| 175 | 176 | va_start(ap, format); | |
@@ -3316,6 +3317,7 @@ static void PrintHelp() { | |||
| 3316 | 3317 | " --zero-fill-buffers automatically zero-fill all newly allocated\n" | |
| 3317 | 3318 | " Buffer and SlowBuffer instances\n" | |
| 3318 | 3319 | " --v8-options print v8 command line options\n" | |
| 3320 | + " --v8-pool-size=num set v8's thread pool size\n" | ||
| 3319 | 3321 | #if HAVE_OPENSSL | |
| 3320 | 3322 | " --tls-cipher-list=val use an alternative default TLS cipher list\n" | |
| 3321 | 3323 | #endif | |
@@ -3459,6 +3461,8 @@ static void ParseArgs(int* argc, | |||
| 3459 | 3461 | } else if (strcmp(arg, "--v8-options") == 0) { | |
| 3460 | 3462 | new_v8_argv[new_v8_argc] = "--help"; | |
| 3461 | 3463 | new_v8_argc += 1; | |
| 3464 | + } else if (strncmp(arg, "--v8-pool-size=", 15) == 0) { | ||
| 3465 | + v8_thread_pool_size = atoi(arg + 15); | ||
| 3462 | 3466 | #if HAVE_OPENSSL | |
| 3463 | 3467 | } else if (strncmp(arg, "--tls-cipher-list=", 18) == 0) { | |
| 3464 | 3468 | default_cipher_list = arg + 18; | |
@@ -4266,8 +4270,7 @@ int Start(int argc, char** argv) { | |||
| 4266 | 4270 | V8::SetEntropySource(crypto::EntropySource); | |
| 4267 | 4271 | #endif | |
| 4268 | 4272 | ||
| 4269 | - const int thread_pool_size = 4; | ||
| 4270 | - default_platform = v8::platform::CreateDefaultPlatform(thread_pool_size); | ||
| 4273 | + default_platform = v8::platform::CreateDefaultPlatform(v8_thread_pool_size); | ||
| 4271 | 4274 | V8::InitializePlatform(default_platform); | |
| 4272 | 4275 | V8::Initialize(); | |
| 4273 | 4276 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments