-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
trace_events,async_hooks: use intrinsic trace #22127
Conversation
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, but I think this should also remove the old emit API from the binding module.
Yeah, I'm planning to remove that but wanted to make sure there were no objections to this first |
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
Rerun interrupted CI on Linux: https://ci.nodejs.org/job/node-test-commit-linux/20514/ |
Trying again on linux due to a seemingly unrelated failure: https://ci.nodejs.org/job/node-test-commit-linux/20518/ |
Switch to using the intrinsic trace event method for async_hooks. This is a breaking change because of the switch to a nested data argument for exec id and trigger id values.
Remove the older emit and categoryGroupEnabled bindings in favor of the new intrinsics
5d45705
to
c5e0db7
Compare
@mcollina @ofrobots @AndreasMadsen ... updated the PR to remove the older New CI: https://ci.nodejs.org/job/node-test-pull-request/16314/ |
Rerun CI-lite for lint issue: https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/485/ |
CI is good |
@@ -35,6 +36,7 @@ procEnabled.once('exit', common.mustCall(() => { | |||
const procDisabled = cp.spawn( | |||
process.execPath, | |||
[ '--trace-event-categories', 'other', | |||
'--no-warnings', |
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.
Why this? Maybe add a comment.
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.
just to make the test less noisy since the import of internal/test/binding
emits a warning
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
Switch to using the intrinsic trace event method for async_hooks. This is a breaking change because of the switch to a nested data argument for exec id and trigger id values. PR-URL: #22127 Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Remove the older emit and categoryGroupEnabled bindings in favor of the new intrinsics PR-URL: #22127 Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Landed in c85933c and b854604 |
Switch to using the faster intrinsic trace event method for async_hooks.
This is a breaking change because of the switch to a nested data argument for exec id and trigger id values. Although trace events and async hooks are still both experimental, there is code deployed that depends on the current data format for async hooks in trace events (e.g. https://github.com/nearform/node-clinic). Therefore, while this is not technically semver-major, I'm marking it "don't land" on 10, 8, and 6.
/cc @mcollina ... once this does land in master, clinic would need to be updated to account for the new data format. The version metadata in the trace event log can be used to determine which format applies.
Example old format:
trace_event.args.triggerAsyncId
Example new format:
trace_event.args.data.triggerAsyncId
@nodejs/diagnostics @nodejs/trace-events @nodejs/async_hooks
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes