Patent ID: 8332858

Claim:
A lock suitability analysis method comprising: detecting, during execution of a computer program under test (CPUT), an allocation of a resource; creating a list entry for the allocation of the resource in a resource tracking list; setting state bits for the allocation of the resource in a state bit table anchored by the list entry; determining if a first thread attempted to engage a synchronization object associated with the resource; updating the state bits in the state bit table responsive to the determination; determining if a second thread engaged the synchronization object associated with the resource; if so, updating a synchronization object tracking list for the synchronization object to indicate that the synchronization object has caused a task switch to the first thread from the second thread; and if not, updating the synchronization object tracking list for the synchronization object to indicate that the synchronization object is currently-held by the first thread; detecting an access of the resource by the second thread: determining by a processor if the resource was previously-defined “apparently unsuitable” for the synchronization object associated with the resource; if so, re-defining the resource as “definitely suitable” for protection by the synchronization object associated with the resource; and generating a report using a synchronization object tracking list.