-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
Description
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.
[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?
Reactions are currently unavailable