plockstat Mutex Probes
            
         
                  Mutexes enforce mutual exclusion to critical
                                sections. When a thread attempts to acquire a mutex held by another
                                thread using mutex_lock or
pthread_mutex_lock, it will determine if
                                the owning thread is running on a different CPU. If it is, the
                                acquiring thread will spin for a short while
                                waiting for the mutex to become available. If the owner is not
                                executing on another CPU, the acquiring thread will
block.
               
The four plockstat probes pertaining to mutexes are
                                described in the following list. For each probe,
arg0 contains a pointer to the
mutex_t or
pthread_mutex_t structure that represents
                                the mutex.
               
- 
                        
                     mutex-acquire
- 
                     
                     Hold event probe that fires immediately after a mutex is acquired. arg1contains a boolean value that indicates whether the acquisition was recursive on a recursive mutex.arg2indicates the number of iterations that the acquiring thread spent spinning on this mutex.arg2will be non-zero only if themutex-spinprobe fired on this mutex acquisition.
- 
                        
                     mutex-block
- 
                     
                     Contention event probe that fires before a thread blocks on a held mutex. Both mutex-blockandmutex-spinmight fire for a single lock acquisition.
- 
                        
                     mutex-error
- 
                     
                     Error event probe that fires when an error is encountered on a mutex operation. arg1is theerrnovalue for the error encountered.
- 
                        
                     mutex-release
- 
                     
                     Hold event probe that fires immediately after an mutex is released. arg1contains a boolean value that indicates whether the event corresponds to a recursive release on a recursive mutex.
- 
                        
                     mutex-spin
- 
                     
                     Contention event probe that fires before a thread begins spinning on a held mutex. Both mutex-blockandmutex-spinmight fire for a single lock acquisition.