-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
runtime/pprof: no samples in profile output #14324
Comments
Does closing |
I have updated the gist to close |
Can you also try Go 1.6? Go 1.5 will no longer be maintained in a few days. |
Identical behaviour with 1.6rc2, although the dummy code ran about 20% faster :) |
@eapache what is your invocation for building and running your test program and running pprof? How big is the generated profile.out? I don't see this problem on OS X (El Capitan) or Ubuntu 14.04. I get something like
|
What is the command line you are using to invoke pprof? You should be using
The example you posted is consistent with the common error of omitting On Mon, 15 Feb 2016, 06:57 Caleb Spare notifications@github.com wrote:
|
@davecheney good call. #10863 is the relevant issue. |
Merged into #10863. |
Yes, that was the issue, sorry for the noise. Next time I'll actually try reading the docs :( |
Running on Ubuntu 15.10 x64, on an Intel Haswell i7-4790. I have seen identical behaviour with go 1.5.1 as provided by Ubuntu's repositories and go 1.5.3 as downloaded from https://golang.org/.
I was trying to profile one of my programs, but I was getting weirdly empty profiles (not empty 0-byte files, but syntactically complete pprof files containing no useful samples). I googled around a bunch and eliminated a bunch of common causes before reporting:
The sample app I am profiling is https://gist.github.com/eapache/580b7dbd8800fe9a3234. It runs for ~40 seconds on my machine with no sleeps and only minimal printing to standard output, which should be more than enough to generate samples. I know that the CPU-bound string building dummy code is being run and not optimized out, because I can see it getting slower as the string size grows.
It is running to completion and
StopCPUProfile()
is getting called. If I interrupt it or remove that, I get a 0-byte profile file instead, which makes sense.I am not running on OSX or any platform which is known to have profiling problems as far as I have been able to determine.
When inspecting the profile file with
pprof
I get no errors, but useless output like the following:My first instinct was that I was running without debug symbols for some reason, but I still get correct backtraces if I put a
panic
in somewhere. I'm really not sure what's going on here. I'm happy to try patches, upload the profile file, or whatever else you might need to debug this.The text was updated successfully, but these errors were encountered: