plockstat Reader/Writer Lock Probes
Reader/writer locks enable multiple readers or a single writer, but not both, to be in a critical section at one time. These locks are typically used for structures that are searched more frequently than they are modified, or when threads spend substantial time in a critical section. Users interact with reader/writer locks using the Oracle Solaris rwlock or POSIX pthread_rwlock_init interfaces.
The probes pertaining to readers/writer locks are described in the
following list. For each probe, arg0 contains a
pointer to the rwlock_t or
pthread_rwlock_t structure that
represents the adaptive lock. arg1 contains a
boolean value that indicates whether the operation was as a
writer.
-
rw-acquire -
Hold event probe that fires immediately after a readers/writer lock is acquired.
-
rw-block -
Contention event probe that fires before a thread blocks while attempting to acquire a lock. If enabled, the
rw-acquireprobe or therw-errorprobe will fire afterrw-block. -
rw-error -
Error event probe that fires when an error is encountered during a reader/writer lock operation.
arg1is theerrnovalue of the error encountered. -
rw-release -
Hold event probe that fires immediately after a reader/writer lock is released.