cli: allow --cpu-prof* in NODE_OPTIONS · nodejs/node@1ee5f84 · GitHub
Skip to content

Commit 1ee5f84

Browse files
Ceres6RafaelGSS
authored andcommitted
cli: allow --cpu-prof* in NODE_OPTIONS
Fixes: #56944 PR-URL: #57018 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
1 parent d857ae0 commit 1ee5f84

3 files changed

Lines changed: 16 additions & 4 deletions

File tree

doc/api/cli.md

Lines changed: 4 additions & 0 deletions

src/node_options.cc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -625,19 +625,23 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
625625
"Start the V8 CPU profiler on start up, and write the CPU profile "
626626
"to disk before exit. If --cpu-prof-dir is not specified, write "
627627
"the profile to the current working directory.",
628-
&EnvironmentOptions::cpu_prof);
628+
&EnvironmentOptions::cpu_prof,
629+
kAllowedInEnvvar);
629630
AddOption("--cpu-prof-name",
630631
"specified file name of the V8 CPU profile generated with "
631632
"--cpu-prof",
632-
&EnvironmentOptions::cpu_prof_name);
633+
&EnvironmentOptions::cpu_prof_name,
634+
kAllowedInEnvvar);
633635
AddOption("--cpu-prof-interval",
634636
"specified sampling interval in microseconds for the V8 CPU "
635637
"profile generated with --cpu-prof. (default: 1000)",
636-
&EnvironmentOptions::cpu_prof_interval);
638+
&EnvironmentOptions::cpu_prof_interval,
639+
kAllowedInEnvvar);
637640
AddOption("--cpu-prof-dir",
638641
"Directory where the V8 profiles generated by --cpu-prof will be "
639642
"placed. Does not affect --prof.",
640-
&EnvironmentOptions::cpu_prof_dir);
643+
&EnvironmentOptions::cpu_prof_dir,
644+
kAllowedInEnvvar);
641645
AddOption("--experimental-network-inspection",
642646
"experimental network inspection support",
643647
&EnvironmentOptions::experimental_network_inspection);

test/parallel/test-process-env-allowed-flags-are-documented.js

Lines changed: 4 additions & 0 deletions

0 commit comments

Comments
 (0)