WSL gprof reporting zero times

Viewed 670

I'm trying to use gprof in WSL on Windows 10. I hadn't anticipated any difficulty, because it worked fine last time I used it in an Ubuntu virtual box on Windows 7. Following as before the directives from https://www.thegeekstuff.com/2012/08/gprof-tutorial/ I did the following:

g++ -funsigned-char -pg -oayane -std=c++11 *.cc -lgmp
./ayane eqv10.p
gprof ayane gmon.out >report.txt

All of which went apparently without a hitch. The report reads as follows:

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 1376487464     0.00     0.00  typeof(long)
  0.00      0.00     0.00 990300741     0.00     0.00  symp(long)
  0.00      0.00     0.00 889924507     0.00     0.00  std::remove_reference<long&>::type&& std::move<long&>(long&)
  0.00      0.00     0.00 854305643     0.00     0.00  basic(long)
  0.00      0.00     0.00 561627773     0.00     0.00  unify(long, long)
  0.00      0.00     0.00 561627773     0.00     0.00  unify1(long, long)

etc. So it's not like nothing is happening; it's recording lots of function calls, the statistics for which look plausibly correct. The program ran for some tens of seconds, so it's not like it didn't run for long enough. But all the recorded times are zero.

Is there a known problem, or am I doing something wrong?

gprof version:

(base) a@DESKTOP-4B7M920:/mnt/c/ayane$ gprof --version
GNU gprof (GNU Binutils for Ubuntu) 2.30
0 Answers
Related