Description
- This issue is to a) track progress on Google's implementation of a Trace Events Tracing Controller within V8 and b) determine if/how Node should use and build on that implementation.
For initial discussion see 2016-06-01 meeting notes.
The Chromium projects use a shared tracing system based on the macros defined in chromium/src/base/trace_event/common/trace_event_common.h. @ofrobots added this file to Node here.
Processing for traces emitted through these macros is implemented by each component, e.g. V8. For example, Chromium's implementation is here and V8's current "noop" implementation is here.
@ofrobots and @matthewloring are working on an implementation of a Tracing Controller (processor) within V8 (based on Chromium's?) which we could utilize in Node; we'll need to decide on that.
We'd still need to address the following and more ourselves in Node. Some of this discussion has begun in #30.
- If/how should user/core native and/or JS Node modules be able to publish traces via the Trace Events system? For example, we could surface APIs through
console.trace
.- V8/D8's global console object provides this.
- If/how should native and/or JS Node modules be able to subscribe to or collect traces received by the Trace Events system? For example, should we stream out all traces to listeners if requested? Dump a file?
- The implementation which Google is working on saves all traces in memory to optimize performance; it would be up to Node to define and implement interfaces for accessing these traces in various ways.
- What should be the categories and common trace properties (e.g. timestamp, PID, backtrace) for use in Node?
- What should be the serialization/output format for trace files? Multiple tools may want to post-process, analyze, and/or visualize traces.
- The Chromium projects have agreed on this format for now.
- Chromium is considering a binary format based on ProtoBufs.
These details were discussed in #49's meeting.
Edits:
- 2016-06-09: Added link to meeting notes in repo.