title: Avoid profiling pthread functions
body: <p>I am profiling a multi threaded application that uses pthread library, to get information about its most executed Basic Blocks (BBLs). 
  The problem I have encountered is that there are a lot of blocks belonging to <code>__pthread_mutex_lock</code> function, which are not only in the TOP 100 most executed BBLs, but in the TOP 10. This is really annoying because I am not interested in BBLs belonging to pthread library functions at all.</p>
  
  <p>My mentor and I were speculating if busy wait had something to do with this, because in MPI there are ways to change locks to behave from busy waiting mode to blocking mode, so when profiling apps these kind of pthread functions don't appear that much, not even in the top 10. I have never worked with MPI so excuse me if what I say is not very accurate.</p>
  
  <p>What I wanted to ask here is if anyone knows a way to do something like that to pthreads. Changing the code of the application is not an option, but if there is a compiling knob to compile the application, appart from -lpthread, that can change its behaviour not to get so many BBLs from its libraries, would be great.</p>
  
  <p>Thank you for your time.</p>