]> Cypherpunks repositories - gostls13.git/commit
cmd/pprof: search for sample types in profile
authorRaul Silvera <rsilvera@google.com>
Wed, 14 Dec 2016 21:32:18 +0000 (13:32 -0800)
committerMichael Matloob <matloob@golang.org>
Thu, 15 Dec 2016 14:55:37 +0000 (14:55 +0000)
commit7e4ef4ebfc4f24bb030716c81e0f812aa3a36c97
tree08275ad9753550a0ef44c89e98db3b6ec38924df
parent6f5a77bf5f909e19fbc19f2c75ec1e160ec0aaa5
cmd/pprof: search for sample types in profile

Search the sample types in the profile being processed to map
sample type options to indices in the profile sample type array.

Previously these were hardcoded, which caused issues when the
sample types for a profile type changed. For instance, this was
triggered by the native generation of profiles in profile.proto
format.

This fixes #18230. A similar mechanism already exists on the upstream
pprof.

Change-Id: I945d8d842a0c2ca14299dabefe83124746ecd7e2
Reviewed-on: https://go-review.googlesource.com/34382
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/pprof/internal/driver/driver.go