Get raw pprof output without `go tool pprof` and process it later

209 views
Skip to first unread message

be...@uber.com

unread,
Jul 27, 2015, 5:25:23 PM7/27/15
to golang-nuts
I need to get raw pprof output from the /debug/pprof/profile endpoint of my application without using `go tool pprof`. I tried to make a GET request to /debug/pprof/profile and then feed that output into `go tool pprof`, but that didn't work.

Note: I cannot use `go tool pprof` because Go is not installed on that machine. I need to get the raw profile so I can run `go tool pprof` on a different machine at a later time.

Daniel Morsing

unread,
Jul 27, 2015, 6:50:47 PM7/27/15
to golang-nuts, be...@uber.com
On Monday, July 27, 2015 at 10:25:23 PM UTC+1, be...@uber.com wrote:
I need to get raw pprof output from the /debug/pprof/profile endpoint of my application without using `go tool pprof`. I tried to make a GET request to /debug/pprof/profile and then feed that output into `go tool pprof`, but that didn't work.

Note: I cannot use `go tool pprof` because Go is not installed on that machine. I need to get the raw profile so I can run `go tool pprof` on a different machine at a later time.

If you GET from the /debug/pprof/profile endpoint, then the profile will not have been symbolized. pprof does this automatically when invoked with a URL. If you get your profile out of the endpoint with a regular http client and then invoke "go tool pprof $PATH_TO_BINARY $PROFILE", then you should get a usable profile.
Reply all
Reply to author
Forward
0 new messages