-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: use $GOPATH for source file lookup #23376
Comments
Have similar issue, i have binaries built by CI where $GOPATH set to /go. It is possible to create simlink ($GOPATH -> /go), to trick pprof so it start working correctly, but it is requiring root privileges and not very convenient. |
I just ran into this issue today in class :(. Is there any other solution? |
FWIW this was fixed in upstream pprof by using heuristics to automatically trim the paths in the profiles, and adding a new trim_path option for when the heuristics fail. |
Brilliant and Thank You! |
im currently on the same machine, not on a different one. And I can't run -web. This is what I get when I run
Same thing when I do |
@marwan-at-work Please open a different issue. That's not what this one is about. |
What version of Go are you using (
go version
)?go version go1.9.2 darwin/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?What did you do?
Attempted to profile a heap dump from a binary built on another host and use
list foo
What did you expect to see?
The source code with corresponding data for each line.
What did you see instead?
On my local system, this source code can instead be found in
/Users/phemmer/.go/...
.Ref #13231 which is related, but I can't use $GOROOT, as I don't have a full go toolkit in my home directory, only application source.
The text was updated successfully, but these errors were encountered: