src: move trace_event.h include to internal header#10959
src: move trace_event.h include to internal header#10959bnoordhuis merged 1 commit intonodejs:masterfrom
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. |
Qard
left a comment
There was a problem hiding this comment.
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 <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matthew Loring <mattloring@google.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
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 <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matthew Loring <mattloring@google.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
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 <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matthew Loring <mattloring@google.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
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/