Skip to content

Support --cpu-prof in NODE_OPTIONS #56944

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dmichon-msft opened this issue Feb 7, 2025 · 1 comment · Fixed by #57018
Closed

Support --cpu-prof in NODE_OPTIONS #56944

dmichon-msft opened this issue Feb 7, 2025 · 1 comment · Fixed by #57018
Labels
feature request Issues that request new features to be added to Node.js.

Comments

@dmichon-msft
Copy link

What is the problem this feature will solve?

I'm unclear why --heap-prof, --perf-prof, and --perf-basic-prof are allowed in NODE_OPTIONS, but --cpu-prof is not.

I'm running afoul of this when trying to collect CPU profiles of monorepo builds, in which thousands of individual NodeJS processes are invoked via npm scripts.

What is the feature you are proposing to solve the problem?

Allow --cpu-prof to be passed in NODE_OPTIONS so that the profiler can be enabled when invoking NodeJS child processes via bin stubs.

What alternatives have you considered?

I have ways of having the orchestrator rewrite the CLI invocations to the child processes, but it becomes confusing when NodeJS is invoked via bin aliases for installed npm packages.

@dmichon-msft dmichon-msft added the feature request Issues that request new features to be added to Node.js. label Feb 7, 2025
@github-project-automation github-project-automation bot moved this to Awaiting Triage in Node.js feature requests Feb 7, 2025
@Ceres6 Ceres6 mentioned this issue Feb 11, 2025
@Ceres6
Copy link
Contributor

Ceres6 commented Feb 11, 2025

Hi! I think we can add it, I will look into it

Ceres6 added a commit to Ceres6/node that referenced this issue Feb 12, 2025
nodejs-github-bot pushed a commit that referenced this issue Feb 20, 2025
Fixes: #56944
PR-URL: #57018
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
acidiney pushed a commit to acidiney/node that referenced this issue Feb 23, 2025
Fixes: nodejs#56944
PR-URL: nodejs#57018
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
targos pushed a commit that referenced this issue Feb 24, 2025
Fixes: #56944
PR-URL: #57018
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
targos pushed a commit that referenced this issue Feb 25, 2025
Fixes: #56944
PR-URL: #57018
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
aduh95 pushed a commit that referenced this issue Apr 2, 2025
Fixes: #56944
PR-URL: #57018
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
aduh95 pushed a commit that referenced this issue Apr 3, 2025
Fixes: #56944
PR-URL: #57018
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
RafaelGSS pushed a commit that referenced this issue Apr 16, 2025
Fixes: #56944
PR-URL: #57018
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
RafaelGSS pushed a commit that referenced this issue Apr 17, 2025
Fixes: #56944
PR-URL: #57018
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants