-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
src: fix --prof-process
CLI argument handling
#22790
Conversation
Make sure that options after `--prof-process` are not treated as Node.js options. Fixes: nodejs#22786
assert(logfile); | ||
|
||
// Make sure that the --preprocess argument is passed through correctly. | ||
const { stdout } = spawnSync( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a note here about any arguments accepted by deps/v8/tools/tickprocessor.js
would do in case V8 removes that in the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, done (and also fixed CI a bit) :)
I can confirm this fixes the problem for 0x. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I think we should note in https://github.com/nodejs/node/blob/master/doc/api/cli.md#--prof-process and https://github.com/nodejs/node/blob/master/doc/node.1 about the processing of subsequent options. |
@richardlau Would a follow-up PR be okay? I’d also like to make |
👍 Fine by me. |
Can we fast-track this and getting it into a release asap? |
@mcollina Are you asking for a release sooner than usual (i.e. this week instead of the next one)? |
If possible, yes. If no one is available to do it, it's not a big deal (next week is also ok). A significant number of flamegraph tools (not just clinic) are broken because of this. |
I pushed a commit to skip the test on AIX completely; not sure why it’s failing there. (/cc @nodejs/platform-aix) |
There's this comment in the tick-processor tests: node/test/tick-processor/test-tick-processor-unknown.js Lines 4 to 10 in 19c0620
|
@richardlau Okay, thanks – makes sense! |
Landed in 23f8b02 |
Make sure that options after `--prof-process` are not treated as Node.js options. Fixes: #22786 PR-URL: #22790 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Make sure that options after `--prof-process` are not treated as Node.js options. Fixes: #22786 PR-URL: #22790 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Make sure that options after `--prof-process` are not treated as Node.js options. Fixes: #22786 PR-URL: #22790 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Make sure that options after `--prof-process` are not treated as Node.js options. Fixes: #22786 PR-URL: #22790 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Make sure that options after
--prof-process
are not treatedas Node.js options.
Fixes: #22786
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes