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. In some embodiments, a
compiler may obtain performance profile data, annotated by output
obtained from the use of the performance indicators and counters, along
with the instructions/data of the computer program and use this
information to optimize the manner by which the computer program is
executed, instructions/data are stored, and the like. The optimizations
may be to optimize the instruction paths, optimize the time spent in
initial application load, the manner by which the cache and memory is
utilized, and the like.