diff options
author | unknown <daria.kolistratova@intel.com> | 2016-10-07 18:21:03 +0300 |
---|---|---|
committer | Michael Matloob <matloob@golang.org> | 2016-10-28 18:08:27 +0000 |
commit | 7d14401bcbee4a8ff33ac869ef5ebb156a179ab6 (patch) | |
tree | 4ad1794aacfee87f3d69d380a824586fd560f57b /src/runtime/crash_cgo_test.go | |
parent | d70b0fe6c4d1b1369b742ea5b7d4e6f0c50ffdcb (diff) | |
download | go-7d14401bcbee4a8ff33ac869ef5ebb156a179ab6.tar.gz go-7d14401bcbee4a8ff33ac869ef5ebb156a179ab6.zip |
runtime/pprof: write profiles in protobuf format.
Added functions with suffix proto and stuff from pprof tool to translate
to protobuf. Done as the profile proto is more extensible than the legacy
pprof format and is pprof's preferred profile format. Large part was taken
from https://github.com/google/pprof tool. Tested by hand and compared the
result with translated by pprof tool, profiles are identical.
Fixes #16093
Change-Id: I5acdb2809cab0d16ed4694fdaa7b8ddfd68df11e
Reviewed-on: https://go-review.googlesource.com/30556
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
Diffstat (limited to 'src/runtime/crash_cgo_test.go')
-rw-r--r-- | src/runtime/crash_cgo_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/crash_cgo_test.go b/src/runtime/crash_cgo_test.go index 34d1f0594a..472afcb38b 100644 --- a/src/runtime/crash_cgo_test.go +++ b/src/runtime/crash_cgo_test.go @@ -271,10 +271,11 @@ func testCgoPprof(t *testing.T, buildArg, runArg string) { if err != nil { t.Fatal(err) } + fn := strings.TrimSpace(string(got)) defer os.Remove(fn) - cmd := testEnv(exec.Command(testenv.GoToolPath(t), "tool", "pprof", "-top", "-nodecount=1", exe, fn)) + cmd := testEnv(exec.Command(testenv.GoToolPath(t), "tool", "pprof", "-top", "-nodecount=1", "-symbolize=force", exe, fn)) found := false for i, e := range cmd.Env { |