Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/pprof: go tool pprof starts the prof without binary #10863

Closed
jlabath opened this issue May 15, 2015 · 8 comments
Closed

cmd/pprof: go tool pprof starts the prof without binary #10863

jlabath opened this issue May 15, 2015 · 8 comments

Comments

@jlabath
Copy link

jlabath commented May 15, 2015

go version go1.4.1 linux/amd64

go tool pprof cpu.prof
Entering interactive mode (type "help" for commands)
(pprof) top
10.29s of 10.29s total (  100%)
      flat  flat%   sum%        cum   cum%
    10.29s   100%   100%     10.29s   100%  

where i should have typed this

go tool pprof mybinary cpu.prof

I did fail to read the help correctly so it is my own fault - but it gave me no indication i did anything wrong.
ref: https://groups.google.com/forum/#!topic/Golang-Nuts/dd9QwwGdt34

@nightlyone
Copy link
Contributor

Note: Only Googlers can work on this, because pprof in go 1.5 is just a copy of internal source according to https://github.com/golang/go/blob/master/src/cmd/pprof/README

@bradfitz
Copy link
Contributor

Not true. Hack on Go's version at will. We'll deal with synchronizing with Google's version occasionally in batches.

@bradfitz bradfitz changed the title go tool pprof starts the prof without binary cmd/pprof: go tool pprof starts the prof without binary May 15, 2015
@DanielMorsing
Copy link
Contributor

Starting a pprof without the binary is still helpful if the profile contains symbol info like when fetched via the net/http/pprof endpoint.

@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Jun 3, 2015
@cespare
Copy link
Contributor

cespare commented Feb 14, 2016

This keeps tripping people up (see #14324 for instance). Is it possible for pprof to give an error, or at least a warning, if it detects this bad usage? (i.e. no binary and the profile doesn't contain the necessary symbols itself to be useful.)

@gopherbot
Copy link

CL https://golang.org/cl/23323 mentions this issue.

@mattetti
Copy link
Contributor

mattetti commented Apr 5, 2017

@rakyll my report we discussed was a duplicate, here is the one you might want to track :)

@dgryski
Copy link
Contributor

dgryski commented Feb 15, 2018

From the 1.9 release notes ( https://golang.org/doc/go1.9#go-tool-pprof )

Profiles produced by the runtime/pprof package now include symbol information, so they can be viewed in go tool pprof without the binary that produced the profile.

I think this can be closed.

@bradfitz
Copy link
Contributor

Yay.

@golang golang locked and limited conversation to collaborators Feb 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants