Skip to content

v8: expose size and count in heap profile output - #65737

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
IlyasShabi:ishabi/heap-size-count
Sep 26, 2026
Merged

nodejs-github-bot merged 1 commit into
nodejs:mainfrom
IlyasShabi:ishabi/heap-size-count

Conversation

@IlyasShabi

Copy link
Copy Markdown
Member

v8.startHeapProfile().stop() returns the sampling heap profile in the CDT format. That format reports only size (= objectSize × objectCount) per sample and selfSize per node, discarding the object count and the live/collected distinction that V8 already tracks.

In this PR every existing CDT field keeps its name and value, and :

  • Nodes: add selfCount (number of sampled objects) alongside selfSize (total bytes).
  • Samples: add objectSize, objectCount, and isLive.

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Sep 2, 2026
Signed-off-by: ishabi <ilyasshabi94@gmail.com>
@IlyasShabi
IlyasShabi force-pushed the ishabi/heap-size-count branch from 30b4ca6 to 55080ea Compare September 2, 2026 09:48
@codecov

codecov Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.98%. Comparing base (5ed55ba) to head (55080ea).
⚠️ Report is 555 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65737      +/-   ##
==========================================
- Coverage   90.05%   89.98%   -0.07%     
==========================================
  Files         754      755       +1     
  Lines      256518   257288     +770     
  Branches    48534    48772     +238     
==========================================
+ Hits       231007   231527     +520     
- Misses      16609    16863     +254     
+ Partials     8902     8898       -4     
Files with missing lines Coverage Δ
src/node_profiling.cc 82.50% <100.00%> (+1.41%) ⬆️

... and 45 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.

@addaleax addaleax added semver-minor PRs that contain new features and should be released in the next minor version. author ready PRs with CI started, the required approvals, and no outstanding review comments. v8 module Issues and PRs related to the node:v8 module. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Sep 25, 2026
@addaleax addaleax changed the title src: expose size and count in heap profile output v8: expose size and count in heap profile output Sep 25, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 25, 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

@panva panva added the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 26, 2026
@nodejs-github-bot
nodejs-github-bot merged commit cf072ab into nodejs:main Sep 26, 2026
84 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in cf072ab

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 26, 2026
aduh95 pushed a commit that referenced this pull request Sep 27, 2026
Signed-off-by: ishabi <ilyasshabi94@gmail.com>
PR-URL: #65737
Reviewed-By: Anna Henningsen <anna@addaleax.net>
HoonDongKang pushed a commit to HoonDongKang/node that referenced this pull request Sep 28, 2026
Signed-off-by: ishabi <ilyasshabi94@gmail.com>
PR-URL: nodejs#65737
Reviewed-By: Anna Henningsen <anna@addaleax.net>
aduh95 pushed a commit that referenced this pull request Sep 28, 2026
Signed-off-by: ishabi <ilyasshabi94@gmail.com>
PR-URL: #65737
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. semver-minor PRs that contain new features and should be released in the next minor version. v8 module Issues and PRs related to the node:v8 module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants