Patent ID: 7483801

Claim:
A method comprising: passing a plurality of identifiers of a plurality of respective event groups to a calibration program; determining a plurality of first numbers of processor execution cycles used by the calibration program that performs functions that cause events in the plurality of respective event groups with a collector inactive; after the determining the plurality of first numbers of processor execution cycles, starting the collector and passing the plurality of identifiers of the plurality of respective event groups to the collector; determining a plurality of second numbers of processor execution cycles used by the calibration program that performs the functions that cause the events in the plurality of respective event groups with the collector active, wherein the collector detects the events in the plurality of respective event groups identified by the plurality of identifiers and creates data associated with the events; calculating a respective compensation value for each of the respective event groups to be a respective difference between the respective first number of processor execution cycles and the respective second number of processor execution cycles divided by a number of events in the respective group; after the calculating, detecting an collected event caused by an application; determining the event group to which the collected event belongs; determining a collected number of processor execution cycles used by processing the collected event; subtracting the compensation value associated with the event group to which the collected event belongs from the collected number of processor execution cycles; and storing a result of the subtracting the compensation value.