pprof - source code

200 views
Skip to first unread message

Kane Kim

unread,
Jul 28, 2015, 5:51:40 PM7/28/15
to golang-nuts
Is source code required for pprof to function? 
When I'm trying to list the source with list .Foo it gives me an error:
Error: open /opt/go/src/github.com/XXX no such file or directory

P.s. running > go tool pprof --cum binary pprof.gz

Dave Cheney

unread,
Jul 29, 2015, 12:09:11 AM7/29/15
to golang-nuts
Yes, source code is required. Go programs do not embed the source code they were built with, only file paths and line numbers.

Dave

aurelien

unread,
Jul 29, 2015, 4:56:04 AM7/29/15
to golang-nuts, kane....@gmail.com
Hi Kane,

Where do you find the manual for that command?

Readin https://groups.google.com/forum/#!topic/golang-nuts/k4RwbsIMyOc , https://groups.google.com/forum/#!topic/golang-nuts/k4RwbsIMyOc , or the source code itself of pprof.go https://groups.google.com/forum/#!topic/golang-nuts/k4RwbsIMyOc I do not see anything corresponding to the way of use pprof.


Aurélien DESBRIÈRES

Kane Kim

unread,
Jul 29, 2015, 12:35:33 PM7/29/15
to golang-nuts, gnu....@gmail.com
Thanks, Dave!

>Where do you find the manual for that command?
Type help in pprof command line.

aurelien

unread,
Jul 29, 2015, 3:33:20 PM7/29/15
to golang-nuts, kane....@gmail.com
 
go pprof help ... give nothing back :/

Nigel Tao

unread,
Jul 29, 2015, 9:03:17 PM7/29/15
to aurelien, golang-nuts, kane....@gmail.com
On Thu, Jul 30, 2015 at 5:33 AM, aurelien <gnu....@gmail.com> wrote:
> go pprof help ... give nothing back :/

Running
$ go tool pprof
will give you some help.

Separately, once you've started pprof, typing "help" will give more help:
$ go tool pprof x.prof
Entering interactive mode (type "help" for commands)
(pprof) help

aurelien

unread,
Jul 30, 2015, 1:46:25 AM7/30/15
to golang-nuts, kane....@gmail.com, nige...@golang.org
nice thanks!
Reply all
Reply to author
Forward
0 new messages