mirror of
https://github.com/golang/go
synced 2024-11-18 09:04:49 -07:00
cmd/trace: use the focustask mode for user task/region trace views
The taskid mode is based on the goroutine-oriented trace view, which displays each goroutine as a separate row. This is good when inspecting the interaction and timeline among related goroutines, and the user region information (associated with each goroutine) in detail, but when many goroutines are involved, this mode does not scale. The focustask mode is based on the default trace view with the user task hierarchy at the top. Each row is a P and there are only a handful number of Ps in most cases, so browsers can handle this mode more gracefully. But, I had difficulty in displaying the user region information (because a goroutine can start/stop/ migrate across Ps, and visualizing the stack of regions nicely was complicated). It may be doable, but it's a work. This CL surfaces the hidden focustask mode. Moreover, use it as the default user task view mode. The taskid mode can be still accessible through 'goroutine view' links. Unlike taskid-based user annotation view that extends goroutine-based trace view, the focustask view Change-Id: Ib691a5e1dd14695fa70a0ae67bff62817025e8c3 Reviewed-on: https://go-review.googlesource.com/c/go/+/227921 Reviewed-by: Michael Matloob <matloob@golang.org> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
1e820a3432
commit
28a55d0123
@ -1062,7 +1062,10 @@ Search log text: <form onsubmit="window.location.search+='&logtext='+window.logt
|
|||||||
<td class="when">{{$el.WhenString}}</td>
|
<td class="when">{{$el.WhenString}}</td>
|
||||||
<td class="elapsed">{{$el.Duration}}</td>
|
<td class="elapsed">{{$el.Duration}}</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><a href="/trace?taskid={{$el.ID}}#{{asMillisecond $el.Start}}:{{asMillisecond $el.End}}">Task {{$el.ID}}</a> ({{if .Complete}}complete{{else}}incomplete{{end}})</td>
|
<td>
|
||||||
|
<a href="/trace?focustask={{$el.ID}}#{{asMillisecond $el.Start}}:{{asMillisecond $el.End}}">Task {{$el.ID}}</a>
|
||||||
|
<a href="/trace?taskid={{$el.ID}}#{{asMillisecond $el.Start}}:{{asMillisecond $el.End}}">(goroutine view)</a>
|
||||||
|
({{if .Complete}}complete{{else}}incomplete{{end}})</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{range $el.Events}}
|
{{range $el.Events}}
|
||||||
<tr>
|
<tr>
|
||||||
@ -1249,7 +1252,7 @@ function reloadTable(key, value) {
|
|||||||
{{range .Data}}
|
{{range .Data}}
|
||||||
<tr>
|
<tr>
|
||||||
<td> <a href="/trace?goid={{.G}}">{{.G}}</a> </td>
|
<td> <a href="/trace?goid={{.G}}">{{.G}}</a> </td>
|
||||||
<td> {{if .TaskID}}<a href="/trace?taskid={{.TaskID}}">{{.TaskID}}</a>{{end}} </td>
|
<td> {{if .TaskID}}<a href="/trace?focustask={{.TaskID}}">{{.TaskID}}</a>{{end}} </td>
|
||||||
<td> {{prettyDuration .TotalTime}} </td>
|
<td> {{prettyDuration .TotalTime}} </td>
|
||||||
<td>
|
<td>
|
||||||
<div class="stacked-bar-graph">
|
<div class="stacked-bar-graph">
|
||||||
|
Loading…
Reference in New Issue
Block a user