title: How to profile each call to a function?
body: <p>I want to profile my execution in a non-standard way. Using <em>gprof</em>, <em>Valgrind</em>, <em>Oprofile</em>... for a given function, I only get the mean of its execution time. What I would like is to obtain the standard deviation of this execution time.</p>
  
  <p>Example:</p>
  
  <pre><code>void a()
    sleep ( rand() % 10 + 10 )
  
  void b()
    sleep ( rand() % 14 + 2 )
  
  main
    for (1 .. 100)
      a()
      b()
  </code></pre>
  
  <p>With standard tools, <em>a</em> and <em>b</em> functions will have similar behaviour. Do you know any tool which could give me this result, with an automatic approach.</p>
  
  <p>I already tested with <em>TAU</em>, but until now, it is not really relevant. I think there is a solution in this way, but I am not enough confident with TAU. If anyone is Tau expert, I try to keep all the function execution times, and do the math at the end. But I don't know how to specify it in Tau.</p>
  
  <p>I want to profile C / C++ code, but if you have any lead in other programing language, I'm open.</p>