Patent ID: 7917677

Claim:
A computer implemented method for a smart profiler, the computer implemented method comprising: determining an allowable number of interrupts for use by a profiler application, the profiler application executing in a data processing system; determining a count number for a counter; configuring the counter to count occurrences of an event in the data processing system up to the count number; raising an interrupt when the counter has counted the occurrences of the event up to the count number; processing the interrupt; repeating for a predetermined time, the counting of occurrences of the event, raising the interrupt, and processing the interrupt; deciding whether a total number of interrupts raised in the predetermined period differs from the allowable number of interrupts; and adjusting the count number of the counter to cause the difference between the total number of interrupts in the predetermined period and the allowable number of interrupts to decrease, wherein the allowable number of interrupts is not adjusted.