diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2019-04-19 12:15:04 +0300 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2019-04-22 20:48:46 +0300 |
commit | 49d3d11ba7975b2c6df4ecab55b4619da46fcb95 (patch) | |
tree | 90a6011d693065805b725fed7a475b1bf1e2f7ef /src/node_options.h | |
parent | a3d1922958a18851afaae7238cfbd8079070f272 (diff) |
inspector: split --cpu-prof-path to --cpu-prof-dir and --cpu-prof-name
To improve the integration of `--cpu-prof` with workers, this patch
splits `--cpu-prof-path` into `--cpu-prof-dir` and `--cpu-prof-name`,
so when a worker is launched from a thread that enables
`--cpu-prof`, if the parent thread sets `--cpu-prof-dir`, then the
profile of both thread would be generated to the specified directory.
If they end up specifying the same `--cpu-prof-name` the behavior
is undefined the last profile will overwritten the first one.
PR-URL: https://github.com/nodejs/node/pull/27306
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'src/node_options.h')
-rw-r--r-- | src/node_options.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_options.h b/src/node_options.h index d0d35b162e6..f9226156900 100644 --- a/src/node_options.h +++ b/src/node_options.h @@ -110,7 +110,8 @@ class EnvironmentOptions : public Options { bool preserve_symlinks_main = false; bool prof_process = false; #if HAVE_INSPECTOR - std::string cpu_prof_path; + std::string cpu_prof_dir; + std::string cpu_prof_name; bool cpu_prof = false; #endif // HAVE_INSPECTOR std::string redirect_warnings; |