Skip to content
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: When you use pprof, I have a problem. #14087

Closed
torfuzx opened this issue Jan 25, 2016 · 2 comments
Closed

cmd/pprof: When you use pprof, I have a problem. #14087

torfuzx opened this issue Jan 25, 2016 · 2 comments

Comments

@torfuzx
Copy link

torfuzx commented Jan 25, 2016

Go environment information

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/leslie/gopath"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT=""
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"

Go version

go version go1.5.3 linux/amd64

Use pprof

[leslie@zhang ~]$ go tool pprof http://localhost:7070/debug/pprof/profile
Fetching profile from http://localhost:7070/debug/pprof/profile
Please wait... (30s)
Saved profile in /home/leslie/pprof/pprof.localhost:7070.samples.cpu.003.pb.gz
Entering interactive mode (type "help" for commands)
(pprof) top 10
30010ms of 30020ms total (  100%)
Dropped 5 nodes (cum <= 150.10ms)
      flat  flat%   sum%        cum   cum%
   13170ms 43.87% 43.87%    23090ms 76.92%  runtime.chanrecv
    5550ms 18.49% 62.36%     6090ms 20.29%  runtime.atomicload
    4200ms 13.99% 76.35%    27290ms 90.91%  runtime.selectnbrecv
    2800ms  9.33% 85.68%     3500ms 11.66%  runtime.atomicload64
    2720ms  9.06% 94.74%    30010ms   100%  main.(*UDPConn).handle
    1240ms  4.13% 98.87%     1240ms  4.13%  runtime.nop
     330ms  1.10%   100%      330ms  1.10%  runtime.atomicloaduint
         0     0%   100%    30010ms   100%  runtime.goexit
(pprof) 

When I cmd list, note No source information for...

(pprof) list
Total: 30.02s
No source information for main.(*UDPConn).handle
No source information for runtime.atomicload
No source information for runtime.atomicload64
No source information for runtime.atomicloaduint
No source information for runtime.chanrecv
No source information for runtime.fastrand1
No source information for runtime.findrunnable
No source information for runtime.goexit
No source information for runtime.mcall
No source information for runtime.nop
No source information for runtime.park_m
No source information for runtime.schedule
No source information for runtime.selectnbrecv

I find a solution at stackoverflow,then try it.

This link

[leslie@zhang ~]$ go tool pprof mybinary http://localhost:7070/debug/pprof/profile
Fetching profile from http://localhost:7070/debug/pprof/profile
Please wait... (30s)
Saved profile in /home/leslie/pprof/pprof.localhost:7070.samples.cpu.004.pb.gz
open mybinary: no such file or directory

Have a error open mybinary: no such file or directory.Trouble always exists.I don't know how to solve the problem.will you help me out?

@hirochachacha
Copy link
Contributor

@ianlancetaylor ianlancetaylor changed the title When you use pprof, I have a problem. cmd/pprof: When you use pprof, I have a problem. Jan 25, 2016
@ianlancetaylor
Copy link
Contributor

How did you install Go?

We don't usually the issue tracker for questions. You will most likely get a better answer if you ask in one of the forums described at https://golang.org/wiki/Questions .

@torfuzx torfuzx closed this as completed Feb 14, 2016
@golang golang locked and limited conversation to collaborators Feb 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants