]> Cypherpunks repositories - gostls13.git/commit
runtime/pprof: output CPU profiles in pprof protobuf format
authorMichael Matloob <matloob@golang.org>
Thu, 10 Nov 2016 18:31:41 +0000 (13:31 -0500)
committerMichael Matloob <matloob@golang.org>
Thu, 10 Nov 2016 21:07:48 +0000 (21:07 +0000)
commit76f12cdaa2be0b96d314762ff5b2e403d1359cd8
tree951799799bb57d41a3f767200f37088dfbeabe88
parent7448eb4172bfc8f704b9ea39d77d0113a042b9dc
runtime/pprof: output CPU profiles in pprof protobuf format

This change buffers the entire profile and converts in one shot
in the profile writer, and could use more memory than necessary
to output protocol buffer formatted profiles. It should be
possible to convert each chunk in a stream (maybe maintaining
some minimal state to output in the end) which could save on
memory usage.

Fixes #16093

Change-Id: I946c6a2b044ae644c72c8bb2d3bd82c415b1a847
Reviewed-on: https://go-review.googlesource.com/33071
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/go/build/deps_test.go
src/runtime/pprof/internal/protopprof/protopprof.go
src/runtime/pprof/internal/protopprof/protopprof_test.go
src/runtime/pprof/pprof.go
src/runtime/pprof/pprof_test.go