Maybe this is a system clock resolution issue.

Please check your clock resolution like this:

http://live.sysinternals.com/Clockres.exe

C:\var\download>clockres

ClockRes v2.0 - View the system clock resolution
Copyright (C) 2009 Mark Russinovich
SysInternals - www.sysinternals.com

Maximum timer interval: 15.625 ms
Minimum timer interval: 1.000 ms
Current timer interval: 0.977 ms

As far as I know, profile very short running time is meaningless for gprof.

On Mon, Jul 19, 2010 at 02:22, jayshankar nair <n_jayshankar@yahoo.com> wrote:
Hi,

gprof  (Bin utils 2.20) reports the %Time as 0.0  for source code profiling. I
was wondering where i can download the correct binutils binaries with the gprof
fixes. Please let me know.

Thanks,
Jay


Sample Output:


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                             AddAtomA@4
  0.00      0.00     0.00                             AddNumbers
  
  0.00      0.00     0.00                             ExitProcess@4
  0.00      0.00     0.00                             FindAtomA@4
  0.00      0.00     0.00                             GetAtomNameA@12
  0.00      0.00     0.00                             SetUnhandledExceptionFilte