-
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: move trace_event.h include to internal header #10959
Conversation
LGTM |
1 similar comment
LGTM |
Seems this would make the tracing macros unavailable to native module authors, which I don't think is what we want at least long term. Would it be better to bundle the header? /cc @nodejs/diagnostics |
@joshgav I think it would be a good idea to hold off on encouraging native module authors to use these macros directly. Many of the macros are "implementation details" of other macros and not intended to be used outside the file. We should provide a simplified API for recording trace events or provide documentation on the set of macros intended to be part of the public API. |
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.
Agreed that we should probably not be exposing the full surface area of the trace_event.h macros. I think it's best we make this fully internal for now and expose a friendlier API to userland in the future.
Makes sense and I agree in principal, although in the discussion at the last Collab Summit we said we wouldn't wrap the macros or provide an alternate C/C++ API. |
I would also be fine with this approach. Wrapping will incur some performance overhead which we could avoid. |
My only issue with leaving it publicly accessible is that people may try to use it in ways not intended or expected. The |
Move the include from src/node.h to src/node_internals.h. trace_event.h is not shipped in binary-only and headers-only tarballs, making it currently impossible to build add-ons against them. PR-URL: nodejs#10959 Refs: nodejs/citgm#226 (comment) Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matthew Loring <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
Move the include from src/node.h to src/node_internals.h. trace_event.h is not shipped in binary-only and headers-only tarballs, making it currently impossible to build add-ons against them. PR-URL: nodejs#10959 Refs: nodejs/citgm#226 (comment) Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matthew Loring <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
Move the include from src/node.h to src/node_internals.h. trace_event.h is not shipped in binary-only and headers-only tarballs, making it currently impossible to build add-ons against them. PR-URL: nodejs#10959 Refs: nodejs/citgm#226 (comment) Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matthew Loring <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
Move the include from src/node.h to src/node_internals.h.
trace_event.h is not shipped in binary-only and headers-only tarballs,
making it currently impossible to build add-ons against them.
cc @richardlau @matthewloring
CI: https://ci.nodejs.org/job/node-test-pull-request/5990/