Skip to content

deps: add perfetto sdk#62397

Closed
legendecas wants to merge 3 commits intonodejs:mainfrom
legendecas:perfetto-sdk
Closed

deps: add perfetto sdk#62397
legendecas wants to merge 3 commits intonodejs:mainfrom
legendecas:perfetto-sdk

Conversation

@legendecas
Copy link
Copy Markdown
Member

@legendecas legendecas commented Mar 22, 2026

This adds Perfetto SDK as a dependency of Node.js. Notably, this does not add the full Perfetto library as the dependency. The full perfetto library contains Perfetto data pipeline processing support. The Perfetto SDK only supports emitting tracing data.

This is part of the nodejs/diagnostics#654 discussion that V8 moves away from the legacy tracing library.

Key points:

  • The Perfetto support in Node.js would only support binary protobuf data emission.
  • The support does not emit JSON trace data (as the perfetto library uses libjsoncpp to translate protobuf data to JSON at runtime. The Perfetto library does not emit JSON directly)
  • Smaller dependency and produced library size.

This PR only adds the Perfetto SDK. The actual adoption is blocked on #61898 with patches in https://issues.chromium.org/issues/457135433.

Commit efdce9a can be fully reproduced with tools/dep_updaters/update-perfetto.sh.

Refs: nodejs/diagnostics#654
Refs: https://issues.chromium.org/issues/457135433

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/security-wg
  • @nodejs/tsc

@nodejs-github-bot nodejs-github-bot added dependencies Pull requests that update a dependency file. needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. labels Mar 22, 2026
@legendecas legendecas added dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. dont-land-on-v25.x PRs that should not land on the v25.x-staging branch and should not be released in v25.x. labels Mar 22, 2026
@eagle19900203-boop

This comment was marked as spam.

Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Copy Markdown
Member

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

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

It's missing adding update-perfetto.sh to workflows/tools.yml and adding nodejs/diagnostics as codeowner of this updater.

@legendecas
Copy link
Copy Markdown
Member Author

@RafaelGSS I didn't add the workflow because there is no CI covering the build. I plan to add the workflow automate the update when V8 changes landed and with CI setup.

@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 25, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 26, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@legendecas legendecas added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 1, 2026
@avivkeller avivkeller added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 9, 2026
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Apr 9, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/62397
✔  Done loading data for nodejs/node/pull/62397
----------------------------------- PR info ------------------------------------
Title      deps: add perfetto sdk (#62397)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     legendecas:perfetto-sdk -> nodejs:main
Labels     tools, author ready, needs-ci, dependencies, dont-land-on-v20.x, dont-land-on-v22.x, dont-land-on-v24.x, dont-land-on-v25.x
Commits    3
 - deps: add perfetto build files
 - tools: add perfetto updater
 - deps: update perfetto to 54.0
Committers 1
 - Chengzhong Wu <legendecas@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/62397
Refs: https://github.com/nodejs/diagnostics/issues/654
Refs: https://issues.chromium.org/issues/457135433
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/62397
Refs: https://github.com/nodejs/diagnostics/issues/654
Refs: https://issues.chromium.org/issues/457135433
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Sun, 22 Mar 2026 19:09:05 GMT
   ✔  Approvals: 4
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/62397#pullrequestreview-3988575643
   ✔  - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/62397#pullrequestreview-3988649093
   ✔  - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/62397#pullrequestreview-3990158875
   ✔  - Joyee Cheung (@joyeecheung) (TSC): https://github.com/nodejs/node/pull/62397#pullrequestreview-4010914467
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2026-04-01T14:53:38Z: https://ci.nodejs.org/job/node-test-pull-request/72388/
- Querying data for job/node-test-pull-request/72388/
✔  Build data downloaded
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  No git cherry-pick in progress
   ✔  No git am in progress
   ✔  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
✔  origin/main is now up-to-date
- Downloading patch for 62397
From https://github.com/nodejs/node
 * branch                  refs/pull/62397/merge -> FETCH_HEAD
✔  Fetched commits as e6ef4774c202..efdce9a74e10
--------------------------------------------------------------------------------
[main 6304553d8c] deps: add perfetto build files
 Author: Chengzhong Wu <legendecas@gmail.com>
 Date: Sun Mar 22 14:56:02 2026 -0400
 4 files changed, 59 insertions(+)
 create mode 100644 deps/perfetto/BUILD.gn
 create mode 100644 deps/perfetto/VERSION
 create mode 100644 deps/perfetto/perfetto.gyp
 create mode 100644 deps/perfetto/unofficial.gni
[main b3b488e6a1] tools: add perfetto updater
 Author: Chengzhong Wu <legendecas@gmail.com>
 Date: Sun Mar 22 14:49:41 2026 -0400
 2 files changed, 82 insertions(+)
 create mode 100755 tools/dep_updaters/update-perfetto.sh
[main 4b09ab3281] deps: update perfetto to 54.0
 Author: Chengzhong Wu <legendecas@gmail.com>
 Date: Sun Mar 22 14:56:37 2026 -0400
 4 files changed, 279764 insertions(+), 1 deletion(-)
 create mode 100644 deps/perfetto/LICENSE
 create mode 100644 deps/perfetto/sdk/perfetto.cc
 create mode 100644 deps/perfetto/sdk/perfetto.h
   ✔  Patches applied
There are 3 commits in the PR. Attempting autorebase.
(node:997) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
(Use `node --trace-deprecation ...` to show where the warning was created)
Rebasing (2/6)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
deps: add perfetto build files

PR-URL: #62397
Refs: nodejs/diagnostics#654
Refs: https://issues.chromium.org/issues/457135433
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

[detached HEAD 836681b7ae] deps: add perfetto build files
Author: Chengzhong Wu <legendecas@gmail.com>
Date: Sun Mar 22 14:56:02 2026 -0400
4 files changed, 59 insertions(+)
create mode 100644 deps/perfetto/BUILD.gn
create mode 100644 deps/perfetto/VERSION
create mode 100644 deps/perfetto/perfetto.gyp
create mode 100644 deps/perfetto/unofficial.gni
Rebasing (3/6)
Rebasing (4/6)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
tools: add perfetto updater

PR-URL: #62397
Refs: nodejs/diagnostics#654
Refs: https://issues.chromium.org/issues/457135433
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

[detached HEAD b21cb03738] tools: add perfetto updater
Author: Chengzhong Wu <legendecas@gmail.com>
Date: Sun Mar 22 14:49:41 2026 -0400
2 files changed, 82 insertions(+)
create mode 100755 tools/dep_updaters/update-perfetto.sh
Rebasing (5/6)
Rebasing (6/6)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
deps: update perfetto to 54.0

PR-URL: #62397
Refs: nodejs/diagnostics#654
Refs: https://issues.chromium.org/issues/457135433
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

[detached HEAD 7245547f8e] deps: update perfetto to 54.0
Author: Chengzhong Wu <legendecas@gmail.com>
Date: Sun Mar 22 14:56:37 2026 -0400
4 files changed, 279764 insertions(+), 1 deletion(-)
create mode 100644 deps/perfetto/LICENSE
create mode 100644 deps/perfetto/sdk/perfetto.cc
create mode 100644 deps/perfetto/sdk/perfetto.h
Successfully rebased and updated refs/heads/main.

ℹ Add commit-queue-squash label to land the PR as one commit, or commit-queue-rebase to land as separate commits.

https://github.com/nodejs/node/actions/runs/24207909791

@avivkeller avivkeller added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 9, 2026
@avivkeller avivkeller added the commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. label Apr 9, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 9, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Landed in f01f79e...f1ed8d6

nodejs-github-bot pushed a commit that referenced this pull request Apr 9, 2026
PR-URL: #62397
Refs: nodejs/diagnostics#654
Refs: https://issues.chromium.org/issues/457135433
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
nodejs-github-bot pushed a commit that referenced this pull request Apr 9, 2026
PR-URL: #62397
Refs: nodejs/diagnostics#654
Refs: https://issues.chromium.org/issues/457135433
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
nodejs-github-bot pushed a commit that referenced this pull request Apr 9, 2026
PR-URL: #62397
Refs: nodejs/diagnostics#654
Refs: https://issues.chromium.org/issues/457135433
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@legendecas legendecas deleted the perfetto-sdk branch April 9, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-failed An error occurred while landing this pull request using GitHub Actions. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. dependencies Pull requests that update a dependency file. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. dont-land-on-v25.x PRs that should not land on the v25.x-staging branch and should not be released in v25.x. needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants