An apparatus and method for cycle accounting for a
microprocessor are disclosed, in which a performance monitor includes a plurality of silos, a prioritizer, and a combiner. The silos receive
delay reason signals from the main processor pipeline, and output staged signals. The prioritizer receives the staged signals, and outputs a plurality of prioritized signals. The combiner selectively combines various of the prioritize signals, and provides signals indicative of
microprocessor performance. Each
silo includes, in series, a plurality of stages, with each stage containing a single latch. The stages of the
silo are synchronized with the stages of the main processor pipeline. The performance monitor operates in real-time, at the same frequency as the
microprocessor, and in parallel to the main processor pipeline, and correctly accounts for buffering effects of decoupling buffers. Outputted signals include various signals indicative of microprocessor performance, for example, cache misses,
branch mispredictions, and so forth, but only for those miss-events that contribute to a program's visible
delay, thereby providing an accurate picture of where cycles are being wasted.