System and method for measuring latch contention
First Claim
1. A computer implemented method comprising:
- receiving requests for a shared resource, wherein access to the shared resource is controlled with a software lock;
detecting that the software lock is unavailable;
executing an operating system trace hook in response to the detecting, wherein the operating system trace hook records lock usage data, wherein the lock usage data includes a timestamp corresponding to each request, a lock address corresponding to an address of the software lock, a stack call chain for each process making one of the requests at the time the corresponding request was made, and a request count; and
analyzing the recorded lock usage data to identify contended locks and processes that may not be efficiently using software locks.
1 Assignment
0 Petitions
Accused Products
Abstract
A system and method is provided for measuring lock usage in a non-intrusive manner. Measurements are performed only when a lock is contended. When a lock is requested and the lock is available (i.e., is not contended), the only data gathered is a counter that is incremented to keep track of the number of times the particular lock was requested. When a lock is contended, an operating system trace hook is requested. The trace hook records data such as the timestamp that the requestor requested the lock, the request count, a stack traceback to identify the function corresponding to the requestor, and the address of the lock that was requested. Post-operative processing analyzes the recorded trace hook data to identify contended locks and processes that may not be efficiently using locks.
-
Citations
6 Claims
-
1. A computer implemented method comprising:
-
receiving requests for a shared resource, wherein access to the shared resource is controlled with a software lock; detecting that the software lock is unavailable; executing an operating system trace hook in response to the detecting, wherein the operating system trace hook records lock usage data, wherein the lock usage data includes a timestamp corresponding to each request, a lock address corresponding to an address of the software lock, a stack call chain for each process making one of the requests at the time the corresponding request was made, and a request count; and analyzing the recorded lock usage data to identify contended locks and processes that may not be efficiently using software locks. - View Dependent Claims (2, 3, 4, 5, 6)
-
Specification