[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]


D.1.4.5 Mutexes Command

List all known mutexes in use. DECthreads may not know about mutexes that were statically initialized and haven't been used recently. It cannot keep track of each pthread_mutex_t structure within a program - only "auxiliary" structures that are allocated within DECthreads when a thread blocks on a mutex. When metering, all mutexes that have ever been used are known.

Format:

mutexes [object-number] [qualifier]

object-number

One or more object sequence numbers separated by spaces. If specified, only those objects whose sequence numbers are listed are displayed. Each argument that does not begin with "-" is interpreted as the sequence number of an object.


Qualifier           Description
-a          Include internal mutexes created by DECthreads.

-f          List additional information for each mutex.

-h          Display the history buffer of recent operations carried
            out on each mutex. This history is maintained only when
            DECthreads is run with metering enabled. Each line in the
            history shows a specific operation (lock or unlock) with
            additional information such as whether an unlock awakened
            another thread and whether a lock attempt resulted in
            blocking the thread. It also shows the thread that invoked
            the function and the program PC from which DECthreads was
            called. This information is available when DECthreads is run
            with metering enabled.

-l          List only locked mutexes.

-q          Display the sequence number of each thread waiting to lock a
            mutex (if there are any waiters).

-s          Display statistics for each mutex. This includes the number
            of locks and unlocks, the number of times a thread actually
            blocked on the mutex, the maximum number of threads blocked
            on the mutex at any time, and an average "contention" for
            the mutex, which is the average number of waiters. This
            information is available when DECthreads is run with metering
            enabled.