A method, apparatus, and computer instructions in a data processing system
for processing instructions are provided. Instructions are received at a
processor in the data processing system. If a selected indicator is
associated with the instruction, counting of each event associated with
the execution of the instruction is enabled. Functionality may be
provided in the performance monitoring application for initiating the
measurement of secondary metrics with regard to identified instructions,
data addresses, ranges of identified instructions, or ranges of
identified data addresses, based on counter values for primary metrics.
Thus, for example, when a primary metric counter, or a combination of
primary metric counters, meets or exceeds a predetermined threshold
value, an interrupt may be generated. In response to receiving the
interrupt, counters associated with the measuring of secondary metrics of
a range of instructions/data addresses may be initiated.