v8: add heap profile API#62273
Conversation
44720ea to
0221ebd
Compare
0221ebd to
5861bc1
Compare
|
cc @nodejs/diagnostics |
Qard
left a comment
There was a problem hiding this comment.
Some DX and future-looking recommendations, but otherwise LGTM.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #62273 +/- ##
========================================
Coverage 89.77% 89.77%
========================================
Files 697 698 +1
Lines 215749 215915 +166
Branches 41304 41311 +7
========================================
+ Hits 193681 193845 +164
Misses 14161 14161
- Partials 7907 7909 +2
🚀 New features to boost your workflow:
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
f3585b5 to
20bcbff
Compare
|
Can't get rid of flakiness, rebasing on main and pushing again. Can I get an approval again? 🥺 |
20bcbff to
535a6f0
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Commit Queue failed- Loading data for nodejs/node/pull/62273 ✔ Done loading data for nodejs/node/pull/62273 ----------------------------------- PR info ------------------------------------ Title v8: add heap profile API (#62273) Author Ilyas Shabi <ilyasshabi94@gmail.com> (@IlyasShabi) Branch IlyasShabi:ishabi/v8_heap_profile -> nodejs:main Labels c++, lib / src, author ready, needs-ci, commit-queue-rebase Commits 7 - v8: add heap profile API - support heap sampling params - add params as options object - load heap_profile module in worker - make gc flags constants - fix linter - use NODE_DEFINE_CONSTANT for gc flags Committers 1 - ishabi <ilyasshabi94@gmail.com> PR-URL: https://github.com/nodejs/node/pull/62273 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: James M Snell <jasnell@gmail.com> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/62273 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: James M Snell <jasnell@gmail.com> -------------------------------------------------------------------------------- ℹ This PR was created on Mon, 16 Mar 2026 09:34:54 GMT ✔ Approvals: 3 ✔ - Stephen Belanger (@Qard): https://github.com/nodejs/node/pull/62273#pullrequestreview-4030505403 ✔ - Gürgün Dayıoğlu (@gurgunday): https://github.com/nodejs/node/pull/62273#pullrequestreview-3960438243 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/62273#pullrequestreview-4031306391 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2026-04-08T12:55:41Z: https://ci.nodejs.org/job/node-test-pull-request/72560/ - Querying data for job/node-test-pull-request/72560/ ✔ 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 62273 From https://github.com/nodejs/node * branch refs/pull/62273/merge -> FETCH_HEAD ✔ Fetched commits as e6ef4774c202..535a6f0bfa3e -------------------------------------------------------------------------------- [main b9fbd693ab] v8: add heap profile API Author: theanarkh <theratliter@gmail.com> Date: Mon Oct 13 00:34:58 2025 +0800 8 files changed, 177 insertions(+), 60 deletions(-) create mode 100644 test/parallel/test-v8-heap-profile.js [main 713f14a638] support heap sampling params Author: ishabi <ilyasshabi94@gmail.com> Date: Sun Mar 15 21:05:36 2026 +0100 11 files changed, 378 insertions(+), 23 deletions(-) create mode 100644 lib/internal/v8/heap_profile.js [main f4d4b12121] add params as options object Author: ishabi <ilyasshabi94@gmail.com> Date: Mon Mar 16 20:24:37 2026 +0100 8 files changed, 160 insertions(+), 168 deletions(-) [main 1bde172752] load heap_profile module in worker Author: ishabi <ilyasshabi94@gmail.com> Date: Tue Mar 17 15:09:00 2026 +0100 1 file changed, 3 insertions(+), 3 deletions(-) [main 636cf5c518] make gc flags constants Author: ishabi <ilyasshabi94@gmail.com> Date: Mon Mar 30 12:47:02 2026 +0200 2 files changed, 43 insertions(+), 28 deletions(-) [main fe7d47df23] fix linter Author: ishabi <ilyasshabi94@gmail.com> Date: Mon Mar 30 14:51:21 2026 +0200 1 file changed, 1 insertion(+), 1 deletion(-) [main df02eeb844] use NODE_DEFINE_CONSTANT for gc flags Author: ishabi <ilyasshabi94@gmail.com> Date: Mon Mar 30 15:33:34 2026 +0200 1 file changed, 18 insertions(+), 49 deletions(-) ✔ Patches applied There are 7 commits in the PR. Attempting autorebase. (node:348) [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/14) Executing: git node land --amend --yes --------------------------------- New Message ---------------------------------- v8: add heap profile APIhttps://github.com/nodejs/node/actions/runs/24193400736 |
|
Landed in f8b79a1 |
This PR succeeds #60231 by @theanarkh and adds parameter support for heap sampling on both the main thread and workers.