Skip to content

doc: document the --with-perfetto build flag - #65056

Open
lazerg wants to merge 4 commits into
nodejs:mainfrom
lazerg:fix/issue-65055-doc-perfetto
Open

doc: document the --with-perfetto build flag#65056
lazerg wants to merge 4 commits into
nodejs:mainfrom
lazerg:fix/issue-65055-doc-perfetto

Conversation

@lazerg

@lazerg lazerg commented Aug 5, 2026

Copy link
Copy Markdown

The perfetto tracing support added in #64565 was never documented, so there is
no way to find out from the docs that the --with-perfetto configure flag
exists or what it changes.

This adds a short BUILDING.md section for the flag. The trace events and CLI
docs do not name the configure flag. They only describe how a perfetto build
behaves: traces come out as perfetto protobuf, the default trace file name
becomes node_trace.${rotation}.pftrace, and JSON output and inspector-based
collection are not available.

Fixes: #65055

Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/build
  • @nodejs/tsc

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. labels Aug 5, 2026
Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com>

@avivkeller avivkeller left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually don't document configure flags in doc/api, only in the non-user facing docs

Keep the --with-perfetto flag itself documented in BUILDING.md and refer
to a perfetto build by its observable behavior in doc/api, matching how
cli.md already describes FFI-gated builds.

Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com>
@lazerg

lazerg commented Aug 5, 2026

Copy link
Copy Markdown
Author

I checked doc/api before changing this. A few files there do name configure flags. intl.md has an "Options for building Node.js" section with --with-intl and --with-icu-default-data-dir, including ./configure examples. dtls.md says the module must be enabled at build time with the --experimental-dtls configure flag. ffi.md names --shared-ffi, and crypto.md shows ./configure --openssl-conf-name=<name>.

cli.md is different though. It never names a configure flag anywhere. It describes the build condition by its effect instead, like "only available in builds with FFI support" for --experimental-ffi. My line was the only exception in that file, so you are right about it.

I pushed a change that keeps --with-perfetto in BUILDING.md only. cli.md and tracing.md now say "builds with Perfetto support" and link to BUILDING.md for the flag itself.

I kept the behavior text. --trace-event-file-pattern really does default to a different extension in such a build, and NodeTracing is not registered. That is runtime behavior an API reader can hit, so it seemed worth keeping in doc/api. Happy to drop it if you still think it belongs only in BUILDING.md.

Comment thread doc/api/tracing.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doc(cli-flag): missing perfetto

4 participants