Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -3138,6 +3138,10 @@ one is included in the list below.
* `--allow-wasi`
* `--allow-worker`
* `--conditions`, `-C`
* `--cpu-prof-dir`
* `--cpu-prof-interval`
* `--cpu-prof-name`
* `--cpu-prof`
* `--diagnostic-dir`
* `--disable-proto`
* `--disable-sigusr1`
Expand Down
12 changes: 8 additions & 4 deletions src/node_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -614,19 +614,23 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
"Start the V8 CPU profiler on start up, and write the CPU profile "
"to disk before exit. If --cpu-prof-dir is not specified, write "
"the profile to the current working directory.",
&EnvironmentOptions::cpu_prof);
&EnvironmentOptions::cpu_prof,
kAllowedInEnvvar);
AddOption("--cpu-prof-name",
"specified file name of the V8 CPU profile generated with "
"--cpu-prof",
&EnvironmentOptions::cpu_prof_name);
&EnvironmentOptions::cpu_prof_name,
kAllowedInEnvvar);
AddOption("--cpu-prof-interval",
"specified sampling interval in microseconds for the V8 CPU "
"profile generated with --cpu-prof. (default: 1000)",
&EnvironmentOptions::cpu_prof_interval);
&EnvironmentOptions::cpu_prof_interval,
kAllowedInEnvvar);
AddOption("--cpu-prof-dir",
"Directory where the V8 profiles generated by --cpu-prof will be "
"placed. Does not affect --prof.",
&EnvironmentOptions::cpu_prof_dir);
&EnvironmentOptions::cpu_prof_dir,
kAllowedInEnvvar);
AddOption("--experimental-network-inspection",
"experimental network inspection support",
&EnvironmentOptions::experimental_network_inspection);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ const difference = (setA, setB) => {
// Refs: https://github.com/nodejs/node/pull/54259#issuecomment-2308256647
if (!process.features.inspector) {
[
'--cpu-prof-dir',
'--cpu-prof-interval',
'--cpu-prof-name',
'--cpu-prof',
'--heap-prof-dir',
'--heap-prof-interval',
'--heap-prof-name',
Expand Down
Loading