在GO中进行分析-无符号

I'm trying to profile a GO program using the procedure described here:

http://blog.golang.org/2011/06/profiling-go-programs.html .

However pprof shows addresses instead of function names in output:

(pprof) top10
Total: 2113 samples
     298  14.1%  14.1%      298  14.1% 0000000000464d34
     179   8.5%  22.6%      179   8.5% 0000000000418e83
     157   7.4%  30.0%      157   7.4% 0000000000418e60
     112   5.3%  35.3%      112   5.3% 0000000000403293
     101   4.8%  40.1%      101   4.8% 0000000000464d4f
      83   3.9%  44.0%       83   3.9% 000000000040329c
      77   3.6%  47.7%       77   3.6% 0000000000418e7a
      62   2.9%  50.6%       62   2.9% 0000000000456a38
      37   1.8%  52.3%       37   1.8% 0000000000418e41
      37   1.8%  54.1%       37   1.8% 0000000000435f57

Has anyone experienced that and found a fix?

There is a mention here of a 6prof tool to be used in alternative to the procedure described above. Does anyone know if it's still maintained and where to find it?

I'm using go1.0.2 on Win7 64.

Thanks!

I fixed the perl script to work under Windows.

Details here: http://exneehilo.blogspot.com.au/2012/07/profiling-go-with-pprof-under-windows.html

I haven't checked it myself, but as far as I remember, the problem with pprof script is that it uses standard (mingw) version of nm, instead of Go specific nm. Go distro has its own nm program:

C:>go tool nm usage: nm [-aghnsTu] file ... go tool nm: exit status 1

C:>

that understands all Go binary formats, while nm program that comes with mingw does not. Look inside pprof perl script for nm_commands variable. It lists couple of possible candidates, but none of them is what you want. If you change that to point to Go nm instead, it should work.

Feel free to report bug here http://code.google.com/p/go/issues. I think it used to work, because 6nm is listed in nm_commands, but Go nm has been renamed to just nm and moved out of user PATH.

Alex

I had similar problem.

Solution was in actual building application. So when I build with "go build test_app.go" and than run "./test_app" And after that I got right profiling file with function names in it.