-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
What version of Go are you using (go version)?
$ go version go version go1.14.2 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/rravi/.cache/go-build" GOENV="/home/rravi/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/rravi/.gotools" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build296868543=/tmp/go-build -gno-record-gcc-switches"
What did you do?
- generate some traces with User Regions
$ go test cmd/trace -o trace.test $ ./trace.test -savetraces $ ls -l *.trace -rw------- 1 rravi rravi 4459 Apr 19 01:29 TestAnalyzeAnnotationGC.trace -rw------- 1 rravi rravi 2278 Apr 19 01:29 TestAnalyzeAnnotations.trace -rw------- 1 rravi rravi 1938 Apr 19 01:29 TestAnalyzeAnnotationTaskTree.trace -rw------- 1 rravi rravi 9967 Apr 19 01:29 TestDirectSemaphoreHandoff.trace -rw------- 1 rravi rravi 1653 Apr 19 01:29 TestFoo.trace
- start the trace tool
go tool trace ./TestAnalyzeAnnotations.trace 2020/04/19 01:34:02 Parsing trace... 2020/04/19 01:34:02 Splitting trace... 2020/04/19 01:34:02 Opening browser. Trace viewer is listening on http://127.0.0.1:45911
- visit trace ui and click on "User-defined regions"

- click on any of the links under the "Counts" column

What did you expect to see?
What did you see instead?
The table of user regions is missing.

Analysis
The root cause turned out to be a simple encoding error when forming the link: the pc URL parameter is encoded in base 10 whereas the handler expects it be encoded in base 16.
In a local branch, I have the above fix plus some UX improvements that I found useful since I use runtime/trace User Annotation API frequently to debug issues in production.
- Links to pprof style graphs and download links for region specific io, block, syscall and scheduler profiles. I was surprised that this functionality was implemented on the server, but not easily discoverable via the UI.

- Table headers get a
cursor: pointerCSS style on hover to signal to the user that they're in fact clickable (for sorting).

I'll go through the Contribution Guide and put up a review soon.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
