diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2019-03-23 07:39:52 +0800 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2019-04-19 15:38:23 +0800 |
commit | e0e308448240260c207958dfc3dd9245d903af85 (patch) | |
tree | 611f54d2aac113f735f7a3047f2857561192e969 /doc/node.1 | |
parent | 57ab3b56fcba725e1af4ed7f8a05bbdbd0b8a4d9 (diff) | |
download | android-node-v8-e0e308448240260c207958dfc3dd9245d903af85.tar.gz android-node-v8-e0e308448240260c207958dfc3dd9245d903af85.tar.bz2 android-node-v8-e0e308448240260c207958dfc3dd9245d903af85.zip |
inspector: implement --cpu-prof[-path]
This patch introduces a CLI flag --cpu-prof that starts the V8
CPU profiler on start up, and ends the profiler then writes the
CPU profile before the Node.js instance (on the main thread or
the worker thread) exits. By default the profile is written to
`${cwd}/CPU.${yyyymmdd}.${hhmmss}.${pid}.${tid}.${seq}.cpuprofile`.
The patch also introduces a --cpu-prof-path flag for the user
to specify the path the profile will be written to.
Refs: https://github.com/nodejs/node/issues/26878
PR-URL: https://github.com/nodejs/node/pull/27147
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'doc/node.1')
-rw-r--r-- | doc/node.1 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/node.1 b/doc/node.1 index 3de9a5748c..8387b6282a 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -78,6 +78,18 @@ Aborting instead of exiting causes a core file to be generated for analysis. .It Fl -completion-bash Print source-able bash completion script for Node.js. . +.It Fl -cpu-prof +Start the V8 CPU profiler on start up, and write the CPU profile to disk +before exit. If +.Fl -cpu-prof-path +is not specified, the profile will be written to the current working directory. +. +.It Fl -cpu-prof-path +Path the V8 CPU profile generated with +.Fl -cpu-prof +will be written to. When used alone, it implies +.Fl -cpu-prof +. .It Fl -diagnostic-report-directory Location at which the .Sy diagnostic report |