Skip to content

Commit dcf171d

Browse files
committed
Meetings: Add notes from 2016-06-01 meeting.
1 parent ab45c0e commit dcf171d

File tree

1 file changed

+95
-0
lines changed

1 file changed

+95
-0
lines changed

wg-meetings/2016-06-01.md

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Node.js Tracing/Diag WG Meeting
2+
3+
- Date: 2016-06-01
4+
- YouTube: http://www.youtube.com/watch?v=tNxYDvQ1kT8
5+
6+
## Attendees
7+
8+
- @joshgav
9+
- @mhdawson
10+
- @matthewloring
11+
- @ofrobots
12+
- @paulirish
13+
- @pavelfeldman
14+
- @caseq
15+
- @jasonlaster
16+
- @pmuellr
17+
- @fmeawad
18+
+ several more via YouTube
19+
20+
## Agenda
21+
22+
- TRACE_EVENT - Google's plans and how Node can build on them (@ofrobots)
23+
- Trace module - @joshgav's proposal - why and what.
24+
- [nodejs/tracing-wg#50], [joshgav/node-trace]
25+
- Chrome Debugging Protocol and v8_inspector (@ofrobots, Google)
26+
- [nodejs/node#6792], [nodejs/node#7072]
27+
- What it brings to Node and the community now and in the future.
28+
- How can the Diagnostics WG utilize it?
29+
- AsyncWrap [deferred]
30+
- Expanding scope of this WG [deferred]
31+
32+
## Next Meeting
33+
34+
- Return to monthly cadence - first Wednesday of each month at 12pm US Pacific (immediately before CTC meeting). Next meeting will be July 6.
35+
36+
## Minutes
37+
38+
### Tracing
39+
40+
In Chromium, the Trace Event trace system is implemented through a Tracing Controller. @fmeawad is porting this system into V8/D8. @ofrobots and @matthewloring plan to adjust and integrate with Node afterwards.
41+
42+
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.
43+
44+
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.
45+
46+
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.
47+
48+
* @pavelfeldman: Not exactly. We should use trace points (TRACE_EVENT) for C++ instrumentation of the engine and modules, but we should run sampler at all times for complete JS coverage (both engine and user land).
49+
50+
We can already collect JS samples in the tracing format so that the whole profile was a single payload, but we are not satisfied with the memory footprint it generates. So we are working on a revised format that would scale. In the meanwhile, we simply start both Tracing and JS profiler (sampler) and merge reports on the client side.
51+
52+
CDP allows configuration of tracing through the Tracing domain:
53+
https://chromedevtools.github.io/debugger-protocol-viewer/tot/Tracing/
54+
55+
Google recommends we use the same tracing components but configure appropriately for Node.
56+
57+
Trace output can be processed and visualized by other tools too. Google is evaluating trace output format, considering binary format perhaps based on [protobuf](https://github.com/google/protobuf). Currently format is agreed upon by Chromium teams and documented [here][Trace Events file format]: https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview
58+
59+
Chromium’s tracing system and implementation could be used for Node core as well as native and JS modules.
60+
61+
In V8, `console.time` and `console.timeEnd` mark a timestamp and send a trace event. Would need a Node-specific JS implementation using Node-appropriate semantics, possibly in `console`. See https://chromium.googlesource.com/chromium/src/+/lkcr/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp for example.
62+
63+
4μs per call when tracing is on (0 when off) with Chromium Tracing Controller. Categories which are disabled are off (no penalty).
64+
65+
66+
### CDP
67+
68+
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.
69+
70+
Benefits: It’s more efficient. Domains.
71+
72+
Anyone can add domains, Node could identify a canonical subset of the protocol to be supported.
73+
74+
Google/V8 have only been adding to CDP, not changing existing messages.
75+
76+
CDT is reference impl of protocol. In GitHub ([CDT repo][]) there’s an [SDK layer][] that CDT uses to connect to the protocol.
77+
78+
79+
## For next time:
80+
81+
Next meeting: Wednesday 7/6, 12pm US Pacific.
82+
83+
For discussions, Josh will start and continue threads in nodejs/tracing-wg.
84+
85+
These topics were deferred to GitHub and/or a later meeting:
86+
87+
- AsyncWrap (@trevnorris)
88+
- [nodejs/tracing-wg#29], [nodejs/node-eps#18]
89+
- Expanding scope of this workgroup as Diagnostics WG (#46, #47)
90+
91+
[V8 Debugging Protocol]: https://github.com/v8/v8/wiki/Debugging-Protocol
92+
[CDT repo]: https://github.com/ChromeDevTools/devtools-frontend
93+
[SDK layer]: https://github.com/ChromeDevTools/devtools-frontend/tree/master/front_end/sdk
94+
[Trace Events file format]: https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview
95+

0 commit comments

Comments
 (0)