File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1095,8 +1095,12 @@ format instead:
10951095```
10961096
10971097The Perfetto SDK ships in ` deps/perfetto ` , so no additional dependency is
1098- needed. See [ Trace events] ( doc/api/tracing.md ) for how the output of such a
1099- build differs.
1098+ needed.
1099+
1100+ Such a build writes Perfetto protobuf traces instead of JSON, so the default
1101+ trace file name becomes ` node_trace.${rotation}.pftrace ` and the files can be
1102+ opened in < https://ui.perfetto.dev > . It cannot write JSON traces, and it does
1103+ not support trace collection over the inspector protocol.
11001104
11011105## Building Node.js with external core modules
11021106
Original file line number Diff line number Diff line change @@ -3302,9 +3302,7 @@ added: v9.8.0
33023302-->
33033303
33043304Template string specifying the filepath for the trace event data, it
3305- supports ` ${rotation} ` and ` ${pid} ` . It defaults to ` node_trace.${rotation}.log ` ,
3306- or to ` node_trace.${rotation}.pftrace ` in builds with Perfetto support. See
3307- [ Trace events] [ ] for details.
3305+ supports ` ${rotation} ` and ` ${pid} ` .
33083306
33093307### ` --trace-events-enabled `
33103308
@@ -4483,7 +4481,6 @@ node --stack-trace-limit=12 -p -e "Error.stackTraceLimit" # prints 12
44834481[ ShadowRealm ] : https://github.com/tc39/proposal-shadowrealm
44844482[ Source Map ] : https://tc39.es/ecma426/
44854483[ Test tags ] : test.md#test-tags
4486- [ Trace events ] : tracing.md
44874484[ TypeScript type-stripping ] : typescript.md#type-stripping
44884485[ V8 Inspector integration for Node.js ] : debugger.md#v8-inspector-integration-for-nodejs
44894486[ V8 JavaScript code coverage ] : https://v8project.blogspot.com/2017/12/javascript-code-coverage.html
Original file line number Diff line number Diff line change @@ -102,12 +102,6 @@ string that supports `${rotation}` and `${pid}`:
102102node --trace-event-categories v8 --trace-event-file-pattern ' ${pid}-${rotation}.log' server.js
103103```
104104
105- Node.js can also be built with [ Perfetto] [ ] support, as described in
106- [ BUILDING.md] [ ] . Such a build writes Perfetto protobuf traces instead of JSON,
107- so the default file name becomes ` node_trace.${rotation}.pftrace ` and the files
108- can be opened in < https://ui.perfetto.dev > . It cannot write JSON traces, and it
109- does not support trace collection over the inspector protocol.
110-
111105To guarantee that the log file is properly generated after signal events like
112106` SIGINT ` , ` SIGTERM ` , or ` SIGBREAK ` , make sure to have the appropriate handlers
113107in your code, such as:
@@ -295,8 +289,6 @@ console.log(getEnabledCategories());
295289
296290### Collect trace events data by inspector
297291
298- The ` NodeTracing ` domain is not registered in builds with Perfetto support.
299-
300292``` mjs
301293import { Session } from ' node:inspector' ;
302294const session = new Session ();
@@ -369,8 +361,6 @@ async function collect() {
369361collect ();
370362```
371363
372- [ BUILDING.md ] : https://github.com/nodejs/node/blob/HEAD/BUILDING.md#building-nodejs-with-perfetto-support
373- [ Perfetto ] : https://perfetto.dev/
374364[ Performance API ] : perf_hooks.md
375365[ V8 ] : v8.md
376366[ `Worker` ] : worker_threads.md#class-worker
Original file line number Diff line number Diff line change @@ -835,6 +835,14 @@ Enable experimental WebAssembly System Interface (WASI) support.
835835.It Fl -experimental-worker-inspection
836836Enable experimental support for the worker inspection with Chrome DevTools.
837837.
838+ .It Fl -expose-gc
839+ This flag will expose the gc extension from V8.
840+ .Bd -literal
841+ if (globalThis.gc) {
842+ globalThis.gc();
843+ }
844+ .Ed
845+ .
838846.It Fl -force-context-aware
839847Disable loading native addons that are not context-aware.
840848.
@@ -1599,9 +1607,7 @@ tracing is enabled using \fB--trace-events-enabled\fR.
15991607.
16001608.It Fl -trace-event-file-pattern
16011609Template string specifying the filepath for the trace event data, it
1602- supports \fB ${rotation} \fR and \fB ${pid} \fR . It defaults to \fB node_trace.${rotation}.log \fR ,
1603- or to \fB node_trace.${rotation}.pftrace \fR in builds with Perfetto support. See
1604- Trace events for details.
1610+ supports \fB ${rotation} \fR and \fB ${pid} \fR .
16051611.
16061612.It Fl -trace-events-enabled
16071613Enables the collection of trace event tracing information.
You can’t perform that action at this time.
0 commit comments