diff options
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/cli.md | 14 | ||||
-rw-r--r-- | doc/api/debugger.md | 2 | ||||
-rw-r--r-- | doc/api/tracing.md | 19 |
3 files changed, 34 insertions, 1 deletions
diff --git a/doc/api/cli.md b/doc/api/cli.md index d868d70533..2000c2b333 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -129,6 +129,20 @@ added: v2.1.0 Prints a stack trace whenever synchronous I/O is detected after the first turn of the event loop. +### `--trace-events-enabled` +<!-- YAML +added: REPLACEME +--> + +Enables the collection of trace event tracing information. + +### `--trace-event-categories` +<!-- YAML +added: REPLACEME +--> + +A comma separated list of categories that should be traced when trace event +tracing is enabled using `--trace-events-enabled`. ### `--zero-fill-buffers` <!-- YAML diff --git a/doc/api/debugger.md b/doc/api/debugger.md index c8a61d2ce7..e81a0e46ea 100644 --- a/doc/api/debugger.md +++ b/doc/api/debugger.md @@ -201,4 +201,4 @@ To start debugging, open the following URL in Chrome: chrome-devtools://devtools/remote/serve_file/@60cd6e859b9f557d2312f5bf532f6aec5f284980/inspector.html?experiments=true&v8only=true&ws=localhost:9229/node ``` -[TCP-based protocol]: https://github.com/v8/v8/wiki/Debugging-Protocol +[TCP-based protocol]: https://github.com/v8/v8/wiki/Debugging-Protocol
\ No newline at end of file diff --git a/doc/api/tracing.md b/doc/api/tracing.md new file mode 100644 index 0000000000..28e488201e --- /dev/null +++ b/doc/api/tracing.md @@ -0,0 +1,19 @@ +# Tracing + +Trace Event provides a mechanism to centralize tracing information generated by +V8, Node core, and userspace code. + +Tracing can be enabled by passing the `--trace-events-enabled` flag when starting a +Node.js application. + +The set of categories for which traces are recorded can be specified using the +`--trace-event-categories` flag followed by a list of comma separated category names. +By default the `node` and `v8` categories are enabled. + +```txt +node --trace-events-enabled --trace-event-categories v8,node server.js +``` + +Running Node.js with tracing enabled will produce log files that can be opened +in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) +tab of Chrome. |