Skip to content

Commit

Permalink
Meetings: Add notes from 2016-06-01 meeting.
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgav committed Jun 3, 2016
1 parent 2650b32 commit d5dfdcc
Showing 1 changed file with 91 additions and 0 deletions.
91 changes: 91 additions & 0 deletions wg-meetings/2016-06-01.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Node.js Tracing/Diag WG Meeting

- Date: 2016-06-01
- YouTube: http://www.youtube.com/watch?v=tNxYDvQ1kT8

## Attendees

- @joshgav
- @mhdawson
- @matthewloring
- @ofrobots
- @paulirish
- @pavelfeldman
- @caseq
- @jasonlaster
- @pmuellr
- @fmeawad
+ several more via YouTube

## Agenda

- TRACE_EVENT - Google's plans and how Node can build on them (@ofrobots)
- Trace module - @joshgav's proposal - why and what.
- [nodejs/tracing-wg#50], [joshgav/node-trace]
- Chrome Debugging Protocol and v8_inspector (@ofrobots, Google)
- [nodejs/node#6792], [nodejs/node#7072]
- What it brings to Node and the community now and in the future.
- How can the Diagnostics WG utilize it?
- AsyncWrap [deferred]
- Expanding scope of this WG [deferred]

## Next Meeting

- Return to monthly cadence - first Wednesday of each month at 12pm US Pacific (immediately before CTC meeting). Next meeting will be July 6.

## Minutes

### Tracing

In Chromium, the Trace Event trace system is implemented through a Tracing Controller. @ofrobots and @matthewloring are working on porting this implementation to V8/D8.

In this Tracing Controller, traces are not streamed, they are collected in memory and dumped on request. It would be up to Node to determine how to flush, stream, etc. in Node.

chrome://tracing is intended for platform developers while “Timeline” view in Chrome DevTools is intended for web/app developers. Data source is the same but filtered differently for each tool.

Currently structural tracing is used, but work is in progress to make sampling tracing more efficient/performant and shift to sampling for most uses. See [this video](https://www.youtube.com/watch?v=nxXkquTPng8) for background on structural vs. sampling tracing.

CDP allows configuration of tracing through the Tracing domain:
https://chromedevtools.github.io/debugger-protocol-viewer/tot/Tracing/

Google recommends we use the same tracing components but configure appropriately for Node.

Trace output can be processed and visualized by other tools too. Google is evaluating trace output format, considering binary format perhaps based on ProtoBuf. Currently format is agreed upon by Chromium tools teams and documented [here][Trace Events file format]: https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview

Chromium’s tracing system and implementation could be used for Node core as well as native and JS modules.

In V8, console.time, console.timeEnd mark a timestamp and send a trace event. Would need a Node-specific JS implementation using Node-appropriate semantics, possibly in `console`. https://chromium.googlesource.com/chromium/src/+/lkcr/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp#349

4μs per call when tracing is on (0ms when off) with Chromium Tracing Controller. Categories which are disabled are off (no penalty).


### CDP

Original [V8 Debugging Protocol][] doesn’t support object mirrors efficiently (can’t get props without values). CDP allows V8 to drop support for old protocol, especially the mirrors.

Benefits: It’s more efficient. Domains.

Anyone can add domains, Node could identify a canonical subset of the protocol to be supported.

Google/V8 have only been adding to CDP, not changing existing messages.

CDT is reference impl of protocol. In GitHub ([CDT repo][]) there’s an [SDK layer][] that CDT uses to connect to the protocol.


## For next time:

Next meeting: Wednesday 7/6, 12pm US Pacific.

For discussions, Josh will start and continue threads in nodejs/tracing-wg.

These topics were deferred to GitHub and/or a later meeting:

- AsyncWrap (@trevnorris)
- [nodejs/tracing-wg#29], [nodejs/node-eps#18]
- Expanding scope of this workgroup as Diagnostics WG (#46, #47)

[V8 Debugging Protocol]: https://github.com/v8/v8/wiki/Debugging-Protocol
[CDT repo]: https://github.com/ChromeDevTools/devtools-frontend
[SDK layer]: https://github.com/ChromeDevTools/devtools-frontend/tree/master/front_end/sdk
[Trace Events file format]: https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview

0 comments on commit d5dfdcc

Please sign in to comment.