I'm trying to use pprof to profile a program, but I can not get it
working, I follow the instructions at:
http://golang.org/pkg/http/pprof/ and I add the line:
import _ "http/pprof"
To my program, then recompile and run it. When I use gopprof
http://localhost:6060/debug/pprof/heap I get the following error:
Read http://localhost:6060/debug/pprof/symbol
Use of uninitialized value $line in substitution (s///) at
/Users/royger/go/bin/gopprof line 2742.
http://localhost:6060/debug/pprof/symbol doesn't exist
And when using 6prof http://localhost:6060/debug/pprof/heap
prof: can't open http://localhost:6060/debug/pprof/heap: No such file
or directory
Also, I've took a look at netstat and there's nothing listening at
port 6060, so I guess I'm missing something.
Thanks for the help, Roger.
err := http.ListenAndServe(":6060", nil)
if err != nil {
panic("ListenAndServe: " + err.String())
}
2010/11/6 Roger Pau Monné <roy...@gmail.com>: