title: How to profile multi-threaded C++ application on Linux?
body: <p>I used to do all my Linux profiling with <a href="https://sourceware.org/binutils/docs/gprof/" rel="nofollow noreferrer">gprof</a>.</p>
  <p>However, with my <em><strong>multi-threaded</strong></em> application, it's output appears to be inconsistent.</p>
  <p>Now, I dug this up:</p>
  <p><a href="http://sam.zoy.org/writings/programming/gprof.html" rel="nofollow noreferrer">http://sam.zoy.org/writings/programming/gprof.html</a></p>
  <p>However, it's from a long time ago and in my gprof output, it appears my gprof is listing functions used by non-main threads.</p>
  <p>So, my questions are:</p>
  <ol>
  <li>In 2010, can I easily use gprof to profile multi-threaded Linux C++ applications? (<a href="http://en.wikipedia.org/wiki/Ubuntu_%28operating_system%29#Releases" rel="nofollow noreferrer">Ubuntu 9.10</a>)</li>
  <li>What other tools should I look into for profiling?</li>
  </ol>