Analyzing Program Performance With Sun WorkShop

order [lock [lock]]

Shows the details about lock pairs. For example, the command


% lock_lint order foo bar

shows whether an attempt was made to acquire lock bar while holding lock foo. The output looks something like the following:


:foo :bar seen (first never write-held), valid

First the output tells whether such an attempt actually occurred (seen or unseen). If the attempt occurred, but never with one or both of the locks write-held, a parenthetical message to that effect appears, as shown. In this case, foo was never write-held while acquiring bar.

If an assertion was made about the lock order, the output shows whether the specified order is valid or invalid according to the assertion. If there was no assertion about the order of foo and bar, or if both orders were asserted (presumably because the user wanted to see all places where one of the locks was held while acquiring the other), the output indicates neither valid nor invalid.