forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
inspector: add a "NodeTracing" domain support
This change adds a new inspector domain for receiving Node tracing data. 1. Node.js now can extend Inspector protocol with new domains with the API defined in the src/inspector/node_protocol.pdl. 2. Plumbing code will be generated at the build time. /json/protocol HTTP endpoint returns both V8 and Node.js inspector protocol. 3. "NodeTracing" domain was introduced. It is based on the Chrome "Tracing" domain. PR-URL: nodejs#20608 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
- Loading branch information
Showing
19 changed files
with
843 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Please notify @nodejs/v8-inspector and @nodejs/trace-events before modifying this file | ||
version | ||
major 1 | ||
minor 0 | ||
|
||
experimental domain NodeTracing | ||
type TraceConfig extends object | ||
properties | ||
# Controls how the trace buffer stores data. | ||
optional enum recordMode | ||
recordUntilFull | ||
recordContinuously | ||
recordAsMuchAsPossible | ||
# Included category filters. | ||
array of string includedCategories | ||
|
||
# Gets supported tracing categories. | ||
command getCategories | ||
returns | ||
# A list of supported tracing categories. | ||
array of string categories | ||
|
||
# Start trace events collection. | ||
command start | ||
parameters | ||
TraceConfig traceConfig | ||
|
||
# Stop trace events collection. Remaining collected events will be sent as a sequence of | ||
# dataCollected events followed by tracingComplete event. | ||
command stop | ||
|
||
# Contains an bucket of collected trace events. | ||
event dataCollected | ||
parameters | ||
array of object value | ||
|
||
# Signals that tracing is stopped and there is no trace buffers pending flush, all data were | ||
# delivered via dataCollected events. | ||
event tracingComplete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"protocol": { | ||
"path": "node_protocol.json", | ||
"package": "src/node/inspector/protocol", | ||
"output": "node/inspector/protocol", | ||
"namespace": ["node", "inspector", "protocol"], | ||
"options": [ | ||
{ | ||
"domain": "NodeTracing" | ||
} | ||
] | ||
}, | ||
"exported": { | ||
"package": "include/inspector", | ||
"output": "../../include/inspector", | ||
"string_header": "v8-inspector.h", | ||
"string_in": "StringView", | ||
"string_out": "std::unique_ptr<StringBuffer>", | ||
"to_string_out": "StringBufferImpl::adopt(%s)", | ||
"export_macro": "V8_EXPORT" | ||
}, | ||
"lib": { | ||
"package": "src/node/inspector/protocol", | ||
"output": "node/inspector/protocol", | ||
"string_header": "inspector/node_string.h" | ||
} | ||
} |
Oops, something went wrong.