title: Inaccuracy in gprof output
body: <p>I am trying to profile a c++ function using gprof, I am intrested in the %time taken. I did more than one run and for some reason I got a large difference in the results. I don't know what is causing this, I am assuming the sampling rate or I read in other posts that I/O has something to do with it. So is there a way to make it more accurate and generate somehow almost constant results? </p>
  
  <p>I was thinking of the following: </p>
  
  <ol>
  <li>increase the sampling rate</li>
  <li>flush the caches before executing anything</li>
  <li>use another profiler but I want it to generate results in a similar format to grof as function time% function name, I tried Valgrind but it gave me a massive file in size. So maybe I am generating the file with the wrong command.</li>
  </ol>
  
  <p>Waiting for your input</p>
  
  <p>Regards</p>