Skip to content

v8: add heap profile API#62273

Open
IlyasShabi wants to merge 7 commits intonodejs:mainfrom
IlyasShabi:ishabi/v8_heap_profile
Open

v8: add heap profile API#62273
IlyasShabi wants to merge 7 commits intonodejs:mainfrom
IlyasShabi:ishabi/v8_heap_profile

Conversation

@IlyasShabi
Copy link
Copy Markdown
Member

This PR succeeds #60231 by @theanarkh and adds parameter support for heap sampling on both the main thread and workers.

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Mar 16, 2026
@IlyasShabi IlyasShabi force-pushed the ishabi/v8_heap_profile branch from 44720ea to 0221ebd Compare March 16, 2026 09:51
@IlyasShabi IlyasShabi marked this pull request as ready for review March 16, 2026 09:52
@IlyasShabi IlyasShabi force-pushed the ishabi/v8_heap_profile branch from 0221ebd to 5861bc1 Compare March 16, 2026 10:05
@Qard
Copy link
Copy Markdown
Member

Qard commented Mar 16, 2026

cc @nodejs/diagnostics

Copy link
Copy Markdown
Member

@Qard Qard left a comment

Choose a reason for hiding this comment

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

Some DX and future-looking recommendations, but otherwise LGTM.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 93.60731% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.72%. Comparing base (b4387bd) to head (f3585b5).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/util.cc 85.71% 1 Missing and 8 partials ⚠️
src/node_v8.cc 91.17% 1 Missing and 2 partials ⚠️
lib/v8.js 95.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #62273      +/-   ##
==========================================
- Coverage   91.54%   89.72%   -1.83%     
==========================================
  Files         351      693     +342     
  Lines      147704   214205   +66501     
  Branches    23216    41079   +17863     
==========================================
+ Hits       135223   192193   +56970     
- Misses      12228    14086    +1858     
- Partials      253     7926    +7673     
Files with missing lines Coverage Δ
lib/internal/v8/heap_profile.js 100.00% <100.00%> (ø)
lib/internal/worker.js 96.61% <100.00%> (+0.24%) ⬆️
src/node_worker.cc 82.22% <100.00%> (ø)
src/node_worker.h 91.66% <ø> (ø)
src/util.h 91.20% <100.00%> (ø)
lib/v8.js 98.75% <95.00%> (-0.30%) ⬇️
src/node_v8.cc 82.30% <91.17%> (ø)
src/util.cc 87.22% <85.71%> (ø)

... and 455 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@IlyasShabi IlyasShabi requested review from Qard and addaleax March 17, 2026 08:43
@IlyasShabi IlyasShabi added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 17, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 17, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@IlyasShabi IlyasShabi added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 26, 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

@IlyasShabi IlyasShabi force-pushed the ishabi/v8_heap_profile branch from 4cc95a5 to 76d5907 Compare March 30, 2026 11:11
@IlyasShabi IlyasShabi requested a review from jasnell March 30, 2026 12:52
@IlyasShabi IlyasShabi added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 30, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 30, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants