Skip to content

Commit

Permalink
cli: add --heap-proof flag available to NODE_OPTIONS
Browse files Browse the repository at this point in the history
Fixes: #54257
Signed-off-by: Juan José Arboleda <[email protected]>
  • Loading branch information
juanarbol committed Aug 7, 2024
1 parent 20aff2b commit 994c76a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/node_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -604,19 +604,19 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
"Start the V8 heap profiler on start up, and write the heap profile "
"to disk before exit. If --heap-prof-dir is not specified, write "
"the profile to the current working directory.",
&EnvironmentOptions::heap_prof);
&EnvironmentOptions::heap_prof, kAllowedInEnvvar);
AddOption("--heap-prof-name",
"specified file name of the V8 heap profile generated with "
"--heap-prof",
&EnvironmentOptions::heap_prof_name);
&EnvironmentOptions::heap_prof_name, kAllowedInEnvvar);
AddOption("--heap-prof-dir",
"Directory where the V8 heap profiles generated by --heap-prof "
"will be placed.",
&EnvironmentOptions::heap_prof_dir);
&EnvironmentOptions::heap_prof_dir, kAllowedInEnvvar);
AddOption("--heap-prof-interval",
"specified sampling interval in bytes for the V8 heap "
"profile generated with --heap-prof. (default: 512 * 1024)",
&EnvironmentOptions::heap_prof_interval);
&EnvironmentOptions::heap_prof_interval, kAllowedInEnvvar);
#endif // HAVE_INSPECTOR
AddOption("--max-http-header-size",
"set the maximum size of HTTP headers (default: 16384 (16KB))",
Expand Down
1 change: 1 addition & 0 deletions test/parallel/test-cli-node-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ expectNoWorker(`-r ${JSON.stringify(printSpaceA)}`, 'A\nB\n');
expectNoWorker(`-r ${printA} -r ${printA}`, 'A\nB\n');
expectNoWorker(` -r ${printA} -r ${printA}`, 'A\nB\n');
expectNoWorker(` --require ${printA} --require ${printA}`, 'A\nB\n');
expect('--heap-prof', 'B\n');
expect('--no-deprecation', 'B\n');
expect('--no-warnings', 'B\n');
expect('--no_warnings', 'B\n');
Expand Down

0 comments on commit 994c76a

Please sign in to comment.