diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/cli.md | 51 | ||||
-rw-r--r-- | doc/node.1 | 22 |
2 files changed, 73 insertions, 0 deletions
diff --git a/doc/api/cli.md b/doc/api/cli.md index e76a3296f0..3dbb230c87 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -245,6 +245,57 @@ new X(); added: v12.0.0 --> +### `--heap-prof` +<!-- YAML +added: REPLACEME +--> + +> Stability: 1 - Experimental + +Starts the V8 heap profiler on start up, and writes the heap profile to disk +before exit. + +If `--heap-prof-dir` is not specified, the generated profile will be placed +in the current working directory. + +If `--heap-prof-name` is not specified, the generated profile will be +named `Heap.${yyyymmdd}.${hhmmss}.${pid}.${tid}.${seq}.heapprofile`. + +```console +$ node --heap-prof index.js +$ ls *.heapprofile +Heap.20190409.202950.15293.0.001.heapprofile +``` + +### `--heap-prof-dir` +<!-- YAML +added: REPLACEME +--> + +> Stability: 1 - Experimental + +Specify the directory where the heap profiles generated by `--heap-prof` will +be placed. + +### `--heap-prof-interval` +<!-- YAML +added: REPLACEME +--> + +> Stability: 1 - Experimental + +Specify the average sampling interval in bytes for the heap profiles generated +by `--heap-prof`. The default is 512 * 1024 bytes. + +### `--heap-prof-name` +<!-- YAML +added: REPLACEME +--> + +> Stability: 1 - Experimental + +Specify the file name of the heap profile generated by `--heap-prof`. + Generates a heap snapshot each time the process receives the specified signal. `signal` must be a valid signal name. Disabled by default. diff --git a/doc/node.1 b/doc/node.1 index 13aa94ff38..7349b63568 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -139,6 +139,28 @@ Enable experimental frozen intrinsics support. .It Fl -heapsnapshot-signal Ns = Ns Ar signal Generate heap snapshot on specified signal. . +.It Fl -heap-prof +Start the V8 heap profiler on start up, and write the heap profile to disk +before exit. If +.Fl -heap-prof-dir +is not specified, the profile will be written to the current working directory +with a generated file name. +. +.It Fl -heap-prof-dir +The directory where the heap profiles generated by +.Fl -heap-prof +will be placed. +. +.It Fl -heap-prof-interval +The average sampling interval in bytes for the heap profiles generated by +.Fl -heap-prof . +The default is +.Sy 512 * 1024 . +. +.It Fl -heap-prof-name +File name of the V8 heap profile generated with +.Fl -heap-prof +. .It Fl -http-parser Ns = Ns Ar library Chooses an HTTP parser library. Available values are .Sy llhttp |