Patent ID: 7818743

Claim:
A method comprising: waiting for expiration of a poll interval; and in response to expiration of the poll interval, deciding whether a number of a plurality of threads that wait on a plurality of locks on a plurality of objects exceeds a depth threshold, if the number of the plurality of threads that wait on the plurality of locks on the plurality of objects exceeds the depth threshold, retrieving data regarding the plurality of locks on the plurality of objects, wherein the data comprises an identifier of the plurality of locks, a name of a class from which the plurality of threads were instantiated, a number of the plurality of threads, and a thread stack, and storing the data in a log, if the number of the plurality of threads that wait on the plurality of locks on the plurality of objects does not exceed the depth threshold, refraining from performing the retrieving the data and the storing the data in the log, calculating a plurality of lock wait times for the plurality of the threads, wherein the each of the plurality of lock wait times indicates an amount of time that the respective thread has waited on the lock, storing the plurality of lock wait times in the log, determining whether any of the plurality of lock wait times exceeds a threshold, and storing an identifier of the thread associated with the lock wait time that exceeds the threshold in the log if any of the plurality of lock wait times exceeds the threshold.