Patent ID: 7437622

Claim:
A method comprising: generating via hardware a value of an index based on a combination of one of a plurality of events and one of a plurality of qualifiers to the plurality of events, a count value for an occurrence of which is to be incremented, where the value of the index is generated as one of: a concatenation of a number of bits binarily representing the number of the plurality of events and a number of bits binarily representing the number of the plurality of qualifiers, such that each counter value corresponds to a unique combination of one of the plurality of events and one of the plurality of qualifiers; and, a number of bits binarily representing a number of possibly occurring event-and-qualifier combinations, such that each counter value corresponds to a different one of the possibly occurring event-and-qualifier combinations, wherein a number of counter values is less than the number of the plurality of events multiplied by the number of the plurality of qualifiers; reading by the value of the index the counter value from a memory array indexed by the index; incrementing via hardware the counter value; and, writing the counter value as incremented back into the memory array.