title: how to use gprof in Linux?
body: <p>I have a C code in a file <code>test.c</code> .I have to profile it using <strong>grof</strong>.I have used the following commands to do so.</p>
  
  <p><code>gcc -p -o result test.c<br>
  ./result<br>
  gprof result</code>  </p>
  
  <p>A section of the output looks as follows:</p>
  
  <p>`Flat profile:
  Each sample counts as 0.01 seconds.
   no time accumulated</p>
  
  <p>%   cumulative   self              self     total<br>
   time   seconds   seconds    calls  Ts/call  Ts/call  name`</p>
  
  <p>The problem is no matter what complex or easy program I use <strong>each sample</strong> count doesn't change from 0.01 seconds.Why is that and no time is being accumulated and displayed under the various coloumns.</p>