1. A circuit for measuring a performance of a program running on a processing unit of a processing system, the circuit comprising: an input section for receiving input signals when the program executes specified instructions; a weighting section for receiving from the input section signals representing the executed specified instructions and for assigning weights to the received signals to generate weighted executed instructions signals; a group of counters for counting the weighted executed instruction signals; and a selection logic section for directing each of the input executed instruction signals to one counter of the group of counters.