Lock contention pinpointing
AssigneeHewlett-Packard Development Company, L.P.
InventorsDavid Isaiah Seidman, Piotr Findeisen
Life of this patent
Estimating the term…
Abstract
One embodiment disclosed relates to a method of finding lock contention in an application with concurrent threads. Status data is retrieved by periodically sampling status of said threads. The periodically-sampled status data is accumulated, and the lock contention is statistically found from the accumulated status data. The status data may include location information that is usable to pinpoint the lock contention.
Claims21
A method, implemented in a computer, of finding lock contention in a multi-threaded application, the method comprising:
- retrieving, by the computer, status data by periodically sampling status of a plurality of threads in the multi-threaded application;
- accumulating the periodically-sampled status data, wherein the status data includes location information;
- and
- finding, by the computer, the lock contention based on the accumulated periodically-sampled status data for each of the plurality of threads by calculating a percentage of time said each of the plurality of threads spent waiting on a lock and determining a location of the waiting.
A method, implemented in a computer, of pinpointing lock contention, the method comprising:
- periodically sampling, by the computer, status of a plurality of threads in a multi-threaded application to obtain periodically sampled status data, wherein the status includes state information and location information;
- accumulating the periodically sampled status data, wherein the location information for a thread is accumulated only if the status indicates that the thread is in a block monitor state;
- determining probable locations of lock contention by the plurality of threads in the multi-threaded application based on the accumulated periodically sampled status data for each of the plurality of threads by calculating a percentage of time said each of the plurality of threads spent waiting on a lock and determining a location of the waiting;
- and
- displaying information describing the probable locations of lock contention, if any.
A computer system for pinpointing lock contention in a multi-threaded application running on the system, the system comprising:
- memory having instructions stored thereon;
- a processor configured by the instructions to:
- periodically sample status of a plurality of threads in the multi-threaded application to obtain periodically sampled status data, wherein the status data includes location information;
- accumulate the periodically sampled status data;
- locate a lock contention based on the accumulated periodically sampled status data for each of the plurality of threads by calculating a percentage of time said each of the plurality of threads spent waiting on a lock and determining a location of the waiting;
- and
- display information from the accumulated periodically sampled status data describing a location of the lock contention, if any, within the multi-threaded application.
Dependencies are inferred from the claim text.