You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change adds rudimentary explanation of the various
visualizations to main page of the trace server.
There is clearly a vast amount one could write here,
especially in the form of tutorials, but I've tried to
restrict it to just basic conceptual overview.
Change-Id: Id4dfe9d47f9b31ed5f8fe39f8b3a7c60c0ae8d5a
Reviewed-on: https://go-review.googlesource.com/c/go/+/412876
Reviewed-by: Michael Pratt <[email protected]>
Run-TryBot: Alan Donovan <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
This view displays a timeline for each of the GOMAXPROCS logical
231
+
processors, showing which goroutine (if any) was running on that
232
+
logical processor at each moment.
233
+
234
+
Each goroutine has an identifying number (e.g. G123), main function,
235
+
and color.
236
+
237
+
A colored bar represents an uninterrupted span of execution.
238
+
239
+
Execution of a goroutine may migrate from one logical processor to another,
240
+
causing a single colored bar to be horizontally continuous but
241
+
vertically displaced.
242
+
</p>
243
+
<p>
244
+
Clicking on a span reveals information about it, such as its
245
+
duration, its causal predecessors and successors, and the stack trace
246
+
at the final moment when it yielded the logical processor, for example
247
+
because it made a system call or tried to acquire a mutex.
248
+
249
+
Directly underneath each bar, a smaller bar or more commonly a fine
250
+
vertical line indicates an event occuring during its execution.
251
+
Some of these are related to garbage collection; most indicate that
252
+
a goroutine yielded its logical processor but then immediately resumed execution
253
+
on the same logical processor. Clicking on the event displays the stack trace
254
+
at the moment it occurred.
255
+
</p>
256
+
<p>
257
+
The causal relationships between spans of goroutine execution
258
+
can be displayed by clicking the Flow Events button at the top.
259
+
</p>
260
+
<p>
261
+
At the top ("STATS"), there are three additional timelines that
262
+
display statistical information.
263
+
264
+
"Goroutines" is a time series of the count of existing goroutines;
265
+
clicking on it displays their breakdown by state at that moment:
266
+
running, runnable, or waiting.
267
+
268
+
"Heap" is a time series of the amount of heap memory allocated (in orange)
269
+
and (in green) the allocation limit at which the next GC cycle will begin.
270
+
271
+
"Threads" shows the number of kernel threads in existence: there is
272
+
always one kernel thread per logical processor, and additional threads
273
+
are created for calls to non-Go code such as a system call or a
274
+
function written in C.
275
+
</p>
276
+
<p>
277
+
Above the event trace for the first logical processor are
278
+
traces for various runtime-internal events.
279
+
280
+
The "GC" bar shows when the garbage collector is running, and in which stage.
281
+
Garbage collection may temporarily affect all the logical processors
282
+
and the other metrics.
283
+
284
+
The "Network", "Timers", and "Syscalls" traces indicate events in
285
+
the runtime that cause goroutines to wake up.
286
+
</p>
287
+
<p>
288
+
The visualization allows you to navigate events at scales ranging from several
289
+
seconds to a handful of nanoseconds.
290
+
291
+
Consult the documentation for the Chromium <a href='https://www.chromium.org/developers/how-tos/trace-event-profiling-tool/'>Trace Event Profiling Tool<a/>
0 commit comments