Patent ID: 7421681
Filing Date: 2008-09-02
Classification: G06F

Abstract:
1. A method in a data processing system for executing instructions, the method comprising: examining code for instructions related to acquiring a semaphore; responsive to identifying instructions related to acquiring a semaphore, associating performance indicators with the instructions related to acquiring a semaphore, wherein the performance indicators include performance indicators related to instructions that reserve or modify a semaphore, performance indicators that are related to instructions that are executed if a semaphore is acquired, and performance indicators that are related to instructions that are executed if a semaphore is not acquired; executing the instructions related to acquiring a semaphore in a processor in the data processing system; detecting the performance indicators during execution of the instructions related to acquiring a semaphore; counting attempts to reserve or modify a semaphore, counting attempts to acquire the semaphore and counting failed attempts to acquire the semaphore that occur within the data processing system as specified by the performance indicators; retrieving count values that represents each of the counting; and adjusting operations on the semaphore based on the count values.