Profiling code execution on amd64?

From: Steve Kargl <sgk_at_troutmask.apl.washington.edu>
Date: Thu, 13 Jan 2011 09:12:04 -0800
How does one profile one's code on freebsd-amd64?
It seems that gprof is broken.

troutmask:kargl[234] time ../penetration
CPU time: 7.327 min
Start time: 2011-01-13 08:59:18.419
 Stop time: 2011-01-13 09:06:39.082
  CPU time: 7.34 min
      440.68 real       440.25 user         0.11 sys

troutmask:kargl[235] gprof -b -l ../penetration penetration.gmon | more

granularity: each sample hit covers 4 byte(s) for 0.00% of 25.46 seconds

  %   cumulative   self              self     total           
 time   seconds   seconds    calls  ms/call  ms/call  name    
 96.2      24.48    24.48   282440     0.09     0.09  __mempoolm_MOD_memadd [4]
  1.4      24.84     0.35        0  100.00%           _mcount [5]
  0.7      25.03     0.19        1   188.65   188.82  __srfm_MOD_rms [6]
  0.5      25.14     0.12   608847     0.00     0.00  memcpy [11]

I cannot reconcile how 440.25 seconds is the same a 25.46.

Should src/usr.bin/gprof be disconnected from the build?

-- 
Steve
Received on Thu Jan 13 2011 - 16:12:04 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:10 UTC