-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
src: add tracing category macros #19155
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
Conversation
Adds `TRACING_CATEGORY_NODE`, `TRACING_CATEGORY_NODE1` and
`TRACING_CATEGORY_NODE2` helper macros for consistently building
trace event category strings. For instance,
`TRACING_CATEGORY_NODE2(foo, bar)` would generate the category
string `node,node.foo,node.foo.bar`, such that...
```
TRACE_EVENT_NESTABLE_ASYNC_BEGIN0(
TRACING_CATEGORY_NODE2(foo, bar),
"baz", 1);
```
Would emit if trace events are enabled for categories: `node`,
`node.foo`, or `node.foo.bar`.
This allows a natural scoping down of what trace events a user
may want to receive. Enabling the `node` category would receive
everything Node.js produces.
76181d7 to
ce65bb0
Compare
AndreasMadsen
left 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.
LGTM, now we just need V8 to adopt the the same so I can have v8.gc :D
Adds `TRACING_CATEGORY_NODE`, `TRACING_CATEGORY_NODE1` and
`TRACING_CATEGORY_NODE2` helper macros for consistently building
trace event category strings. For instance,
`TRACING_CATEGORY_NODE2(foo, bar)` would generate the category
string `node,node.foo,node.foo.bar`, such that...
```
TRACE_EVENT_NESTABLE_ASYNC_BEGIN0(
TRACING_CATEGORY_NODE2(foo, bar),
"baz", 1);
```
Would emit if trace events are enabled for categories: `node`,
`node.foo`, or `node.foo.bar`.
This allows a natural scoping down of what trace events a user
may want to receive. Enabling the `node` category would receive
everything Node.js produces.
PR-URL: #19155
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
|
Landed in 1dd9c97 |
|
Should this be backported to |
Adds `TRACING_CATEGORY_NODE`, `TRACING_CATEGORY_NODE1` and
`TRACING_CATEGORY_NODE2` helper macros for consistently building
trace event category strings. For instance,
`TRACING_CATEGORY_NODE2(foo, bar)` would generate the category
string `node,node.foo,node.foo.bar`, such that...
```
TRACE_EVENT_NESTABLE_ASYNC_BEGIN0(
TRACING_CATEGORY_NODE2(foo, bar),
"baz", 1);
```
Would emit if trace events are enabled for categories: `node`,
`node.foo`, or `node.foo.bar`.
This allows a natural scoping down of what trace events a user
may want to receive. Enabling the `node` category would receive
everything Node.js produces.
PR-URL: nodejs#19155
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
|
will open a separate backport PR to get this into 8.x |
Adds
TRACING_CATEGORY_NODE,TRACING_CATEGORY_NODE1andTRACING_CATEGORY_NODE2helper macros for consistently buildingtrace event category strings. For instance,
TRACING_CATEGORY_NODE2(foo, bar)would generate the categorystring
node,node.foo,node.foo.bar, such that...Would emit if trace events are enabled for categories:
node,node.foo, ornode.foo.bar.This allows a natural scoping down of what trace events a user
may want to receive. Enabling the
nodecategory would receiveeverything Node.js produces.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes