I've included the net/http/pprof
package in my code. I can then comfortably run the pprof
profiler (on Debian):
go tool pprof http://localhost:9000/debug/pprof/profile
Commands such as top10
or even generating call graphs work as expected. However, as soon as I try to go into a function, it fails:
(pprof) list MyFunc
No source information for mypkg.MyFunc
My GOPATH
is set to my project's directory. Do I need any special flags or environment variables while building my source code or while running pprof?