Skip to content

v8: add cpu profile options - #62684

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
IlyasShabi:ishabi/cpu-profile-options
Apr 26, 2026
Merged

v8: add cpu profile options#62684
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
IlyasShabi:ishabi/cpu-profile-options

Conversation

@IlyasShabi

Copy link
Copy Markdown
Member

Add options support to v8.startCpuProfile() and worker.startCpuProfile():

  • sampleInterval: requested sampling interval in milliseconds
  • maxBufferSize: maximum number of samples to retain

@nodejs-github-botnodejs-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 Apr 10, 2026
@IlyasShabiIlyasShabi added the v8 module Issues and PRs related to the "v8" subsystem. label Apr 10, 2026
@IlyasShabi
IlyasShabi marked this pull request as ready for review April 10, 2026 21:54
@codecov

codecovBot commented Apr 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.52336% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.68%. Comparing base (8c3cf47) to head (ad99597).
⚠️ Report is 179 commits behind head on main.

Files with missing linesPatch %Lines
src/util.cc58.33%0 Missing and 5 partials ⚠️
lib/internal/v8/cpu_profiler.js94.64%2 Missing and 1 partial ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #62684 +/- ##
==========================================
- Coverage 91.54% 89.68% -1.87% 
==========================================
Files 355 707 +352 Lines 149296 218221 +68925 Branches 23371 41747 +18376 ==========================================
+ Hits 136678 195712 +59034 - Misses 12353 14417 +2064 - Partials 265 8092 +7827 
Files with missing linesCoverage Δ
lib/internal/worker.js96.65% <100.00%> (+0.17%)⬆️
lib/v8.js98.77% <100.00%> (+0.02%)⬆️
src/env.cc85.24% <100.00%> (ø)
src/env.h98.14% <ø> (ø)
src/node_v8.cc82.15% <100.00%> (ø)
src/node_worker.cc82.12% <100.00%> (ø)
src/util.h91.40% <100.00%> (ø)
lib/internal/v8/cpu_profiler.js94.64% <94.64%> (ø)
src/util.cc86.53% <58.33%> (ø)

... and 473 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 marked this pull request as draft April 12, 2026 17:54
@IlyasShabi
IlyasShabiforce-pushed the ishabi/cpu-profile-options branch from d360041 to ff06537CompareApril 12, 2026 18:32
@IlyasShabi
IlyasShabi marked this pull request as ready for review April 12, 2026 18:49
@IlyasShabi
IlyasShabiforce-pushed the ishabi/cpu-profile-options branch from ff06537 to c49027eCompareApril 14, 2026 09:31
@IlyasShabi
IlyasShabiforce-pushed the ishabi/cpu-profile-options branch from c49027e to ad99597CompareApril 14, 2026 13:05
@IlyasShabi

Copy link
Copy Markdown
MemberAuthor

@Qard@jasnell Could you take a look please?

@IlyasShabiIlyasShabi added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 26, 2026
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 26, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@gurgundaygurgunday added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 26, 2026
@theanarkhtheanarkh added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 26, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 26, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@IlyasShabiIlyasShabi added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 26, 2026
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 26, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 4e332e0 into nodejs:mainApr 26, 2026
75 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 4e332e0

aduh95 pushed a commit that referenced this pull request May 5, 2026
PR-URL: #62684
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
@aduh95aduh95 mentioned this pull request May 5, 2026
@aduh95aduh95 added the backport-requested-v24.x PRs awaiting manual backport to the v24.x-staging branch. label May 9, 2026
@aduh95

Copy link
Copy Markdown
Contributor

This would require a manual backport PR along #62273 if we want it on Node.js 24

@aduh95aduh95 mentioned this pull request May 9, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.backport-requested-v24.xPRs awaiting manual backport to the v24.x-staging branch.c++Issues and PRs that require attention from people who are familiar with C++.lib / srcIssues and PRs related to general changes in the lib or src directory.needs-ciPRs that need a full CI run.v8 moduleIssues and PRs related to the "v8" subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@IlyasShabi@nodejs-github-bot@aduh95@Qard@theanarkh@gurgunday