runtime/pprof: no samples in profile output #14324
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
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
My first instinct was that I was running without debug symbols for some reason, but I still get correct backtraces if I put a
The text was updated successfully, but these errors were encountered:
@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 email@example.com wrote: