Patent ID: 8234484

Claim:
A data processor comprising: a datapath of a processor, wherein the datapath includes instruction grouping logic and a plurality of execution units; a performance monitoring unit configured to mark only each of one or more particular instructions from a plurality of instructions in a currently executing instruction stream that meet one or more filtering criteria applied to the currently executing instruction stream and configured to monitor the progress of the one or more particular instructions as they flow through the datapath; a plurality of dedicated registers accessible to the performance monitoring unit, wherein the performance monitoring unit selects at least one of the one or more particular instructions for which to capture stall condition data so as to obtain selected instructions, wherein the stall condition data is stored within a group stall register of the plurality of dedicated registers and represents conditions giving rise to a stall condition; wherein the grouping logic organizes the plurality of instructions in the datapath into groups prior to execution; and wherein, in response to a particular instruction from the selected particular instructions being organized into a particular group, the performance monitoring unit collects a plurality of cycle counts relating to events associated with the data processor's processing of the particular instruction and the particular group, and wherein the performance monitoring unit stores the plurality of cycle counts in the plurality of dedicated registers; wherein each filtering criteria applied is enabled in the performance monitoring unit by software; the performance monitoring unit detecting one or more events that occur in conjunction with the particular group; determining one or more of the events is a stall condition that has occurred with respect to the particular group; determining a cause for the stall condition; and recording the determined cause of the stall condition in one of the plurality of dedicated registers.