Skip to content

src: split profiling helpers from util#63008

Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom
IlyasShabi:ishabi/profiling-utils
May 1, 2026
Merged

src: split profiling helpers from util#63008
nodejs-github-bot merged 1 commit intonodejs:mainfrom
IlyasShabi:ishabi/profiling-utils

Conversation

@IlyasShabi
Copy link
Copy Markdown
Member

Move CPU and heap profiling option parsing and heap profile serialization helpers to new file src/node_profiling.c this keep util smaller and have a profiling dedicated file.

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/gyp

@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 Apr 28, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 82.92683% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.64%. Comparing base (b6b6e96) to head (1c9e4ed).
⚠️ Report is 36 commits behind head on main.

Files with missing lines Patch % Lines
src/node_profiling.cc 81.33% 1 Missing and 13 partials ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main   #63008    +/-   ##
========================================
  Coverage   89.64%   89.64%            
========================================
  Files         707      710     +3     
  Lines      219509   220322   +813     
  Branches    42095    42255   +160     
========================================
+ Hits       196775   197511   +736     
- Misses      14628    14660    +32     
- Partials     8106     8151    +45     
Files with missing lines Coverage Δ
src/env.h 98.14% <ø> (ø)
src/node_profiling.h 100.00% <100.00%> (ø)
src/node_v8.cc 88.10% <ø> (ø)
src/node_worker.cc 82.32% <ø> (+0.30%) ⬆️
src/util.cc 87.44% <ø> (+0.90%) ⬆️
src/util.h 90.98% <ø> (-0.49%) ⬇️
src/node_profiling.cc 81.33% <81.33%> (ø)

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

Copy link
Copy Markdown
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

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

Rubber stamp LGTM

@IlyasShabi IlyasShabi added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 29, 2026
@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 29, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 29, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Comment thread src/node_profiling.h
@@ -0,0 +1,59 @@
// Copyright Joyent, Inc. and other Node contributors.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this file header necessary for these new files?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Shouldn't we add the copyright for new created files?

Copy link
Copy Markdown
Member

@legendecas legendecas May 1, 2026

Choose a reason for hiding this comment

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

@IlyasShabi we do not add license headers for new files. Also I think it is quite dismissive to land the PR while there is an open question

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I merged it after the CI finally passed and didn’t think your comment was blocking.
I see you opened a PR to remove it. Thanks

@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 Apr 30, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 30, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@IlyasShabi IlyasShabi added the commit-queue Add this label to land a pull request using GitHub Actions. label May 1, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label May 1, 2026
@nodejs-github-bot nodejs-github-bot merged commit 9ab960a into nodejs:main May 1, 2026
94 checks passed
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Landed in 9ab960a

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

5 participants