@@ -103,11 +103,10 @@ node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.
103103```
104104
105105Node.js can also be built with the ` --with-perfetto ` configure flag, described
106- in [ BUILDING.md] [ ] . Such a build writes [ Perfetto] ( https://perfetto.dev/ )
107- protobuf traces instead of JSON, so the default file name becomes
108- ` node_trace.${rotation}.pftrace ` and the files are opened at
109- [ ` ui.perfetto.dev ` ] ( https://ui.perfetto.dev/ ) . JSON output is unavailable there,
110- as is trace collection over the inspector protocol.
106+ in [ BUILDING.md] [ ] . Such a build writes [ Perfetto] [ ] protobuf traces instead of
107+ JSON, so the default file name becomes ` node_trace.${rotation}.pftrace ` and the
108+ files can be opened in [ ` ui.perfetto.dev ` ] [ ] . It cannot write JSON traces, and
109+ it does not support trace collection over the inspector protocol.
111110
112111To guarantee that the log file is properly generated after signal events like
113112` SIGINT ` , ` SIGTERM ` , or ` SIGBREAK ` , make sure to have the appropriate handlers
@@ -296,6 +295,9 @@ console.log(getEnabledCategories());
296295
297296### Collect trace events data by inspector
298297
298+ The ` NodeTracing ` domain is not registered in builds configured with
299+ ` --with-perfetto ` .
300+
299301``` mjs
300302import { Session } from ' node:inspector' ;
301303const session = new Session ();
@@ -369,7 +371,9 @@ collect();
369371```
370372
371373[ BUILDING.md ] : https://github.com/nodejs/node/blob/HEAD/BUILDING.md#building-nodejs-with-perfetto-support
374+ [ Perfetto ] : https://perfetto.dev/
372375[ Performance API ] : perf_hooks.md
373376[ V8 ] : v8.md
374377[ `Worker` ] : worker_threads.md#class-worker
375378[ `async_hooks` ] : async_hooks.md
379+ [ `ui.perfetto.dev` ] : https://ui.perfetto.dev/
0 commit comments