Patent ID: 6622189
Filing Date: 2003-09-16
Classification: G06F

Abstract:
A method for controlling spin lock instrumentation for a spin lock in a data processing system comprising a cache consisting of cache lines, the method comprising:reserving a lock flag for the spin lock that represents a busy state for the spin lock; associating a first instrumentation flag with spin lock instrumentation that represents an enablement state for spin lock instrumentation; prior to each acquirement of the spin lock, determining whether or not a second instrumentation flag indicates that spin lock instrumentation is enabled, wherein the second instrumentation flag is an updateable indication of the first instrumentation flag, and wherein the second instrumentation flag is stored within a same cache line containing the lock flag; determining whether or not the lock flag indicates that the spin lock is in a busy state; in response to a determination that the lock flag indicates that the spin lock is in a busy state, determining whether or not the first instrumentation flag indicates that spin lock instrumentation is enabled; and in response to a determination that the first instrumentation flag indicates that spin lock instrumentation is enabled, updating the second instrumentation flag to indicate that spin lock instrumentation is enabled.