Patent attributes
A method, system, and computer usable program product for a smart profiler are provided in the illustrative embodiments. An allowable number of interrupts for use by a profiler application is determined. A count number for a counter is determined. The counter is configured to count occurrences of an event in a data processing system up to the count number. An interrupt is raised when the counter has counted the occurrences of the event up to the count number. The interrupt is processed. The counting of occurrences of the event, raising the interrupt, and processing the interrupt are repeated for a predetermined time. A decision is made whether a total number of interrupts raised in the predetermined period differs from the allowable number. The count number of the counter is adjusted to cause the difference between the total number of interrupts in the predetermined period and the allowable number to decrease.