0

After compiling with flags: -O0 -p -pg -Wall -c on GCC and -p -pg on the MinGW linker, the eclipse plugin gprof for shows no results. After that I did a cmd call using gprof my.exe gmon.out > prof.txt, which resulted in a report witth only the number of calls to functions.

Flat profile: 
Each sample counts as 0.01 seconds.
no time accumulated

  %   cumulative   self              self     total           
 time   seconds   seconds    calls  Ts/call  Ts/call  name    
  0.00      0.00     0.00    16000     0.00     0.00  vector_norm
  0.00      0.00     0.00       16     0.00     0.00  rbf_kernel
  0.00      0.00     0.00        8     0.00     0.00  lubksb

I've came across this topic: gprof reports no time accumulated. But my program is terminating in a clear maner. Also, gprof view show no data on MingW/Windows, but I am using 32 bits GCC. I have previously tried to use Cygwin, same result.

I am using eclipse Kepler with CDT version 8.3.0.201402142303 and MinGW with GCC 5.4.0.

Any help is appreciated, thank you in advance.

Community
  • 1
  • 1
the_grandson
  • 15
  • 10

1 Answers1

0

Sorry for the question, seems that the code is faster than gprof can measure.

As my application involves a neural network train with several iterations and further testing of kernels, I didn't suspected that a fast code could be causing the problem. I inserted a long loop in the main body and the gprof time was printed.

the_grandson
  • 15
  • 10
  • close it as self answered then. – matzeri Jul 24 '16 at 06:40
  • Indeed. Had the same "issue". Apparently, no function call took longer than the sampling time, which is 0.01 seconds. Also, it's not trivial to increase the sampling interval ([reference](http://binutils.sourceware.narkive.com/Qfwc5miT/help-change-the-sampling-time-in-gprof)). – sebkraemer Apr 10 '18 at 08:29