Patent Number: 
Section: claims

1. A method of measuring a performance of a program running on a processing unit of a processing system, the method comprising:informing a logic unit of each instruction in the program that is executed by the processing unit;assigning a weight to said each instruction;assigning, by said logic unit, each of the instructions to one of a plurality of first groups;combining, by said logic unit, the first groups of the instructions into one or more second groups of the instructions;for each of the second groups of the instructions, maintaining, by said logic unit, a performance count based on a number of times the instructions in said each second group of the instructions are executed and the weights assigned to the instructions in said each second group; andanalyzing the performance count of said each of the second groups of the instructions to measure one or more metrics of the program. 2. The method according to claim 1, wherein each instruction includes an operating code portion, and the assigning each of the instructions includes assigning the instructions to said groups based on the operating code portions of the instructions. 3. The method according to claim 1, wherein each instruction is one type of a given number of types, and the assigning each of the instructions includes assigning each type of instruction to a respective one of said plurality of groups. 4. The method according to claim 1, wherein the informing includes said processing unit informing the logic unit of said each instruction in the program that is executed by the processing unit. 5. The method according to claim 1, wherein the assigning a weight to said each instruction includes said logic unit assigning the weight to said each instruction. 6. The method according to claim 1, wherein the assigning each of the instructions to a plurality of first groups includes said logic unit assigning the instructions to the plurality of first groups. 7. The method according to claim 1, wherein:the logic unit is outside the processing unit;the program instructions include floating point instructions; andthe analyzing includes analyzing said groups to determine the number of floating point operations performed by the program. 8. The method according to claim 1, wherein:the specified operation is a floating point operation;the program instructions include a floating point multiply instruction, and a floating point multiply-add instruction; andthe assigning a weight includes assigning the floating point multiply instruction a given weight, and assigning the floating point multiply-add instruction twice said given weight. 9. The method according to claim 1, wherein the logic unit is used to assign the weights to the instructions and to assign each of the instructions to one of the first groups. 10. A system for measuring a performance of a program, the system comprising one or more processing units configured for:running said program;informing a logic unit of each instruction in the program that is executed by the processing unit;assigning a weight to said each instruction;assigning each of the instructions to one of a plurality of first groups;combining the first groups of the instructions into one or more second groups of the instructions;for each of the second groups of the instructions, maintaining a performance count based on a number of times the instructions in said each second group of the instructions are executed and the weights assigned to the instructions in said each second group; andanalyzing the performance count of said each of the second groups of the instructions to measure one or more metrics of the program. 11. The system according to claim 10, wherein each instruction is one type of a given number of types, and the assigning each of the instructions includes assigning each type of instruction to a respective one of said plurality of groups. 12. The system according to claim 10, wherein the assigning a weight to said each instruction includes said logic unit assigning the weight to said each instruction, and the assigning the instructions to a plurality of groups includes said logic unit assigning the instructions to the plurality of groups. 13. A system for measuring a performance of a program, the system comprising one or more processing units configured for:running said program;informing a logic unit of each instruction in the program that is executed by the processing unit;assigning a weight to said each instruction;assigning the instructions to a plurality of groups; andanalyzing said plurality of groups to measure one or more metrics of the program; andwherein said running includes running the program on a specific one of the processing units, and the informing includes said specific one of the processing unit informing the logic unit of said each instruction in the program that is executed by the processing unit. 14. An article of manufacture comprising:at least one tangible non-transitory computer readable device having computer readable program code logic tangibly embodied therein to execute machine instructions in one or more processing units for measuring a performance of a program running on a processing unit of a processing system, the method comprising:informing a logic unit of each instruction in the program that is executed by the processing unit;assigning a weight to said each instruction;assigning each of the instructions to one of a plurality of first groups;combining the first groups of the instructions into one or more second groups of the instructions;for each of the second groups of the instructions, maintaining a performance count based on a number of times the instructions in said each second group of the instructions are executed and the weights assigned to the instructions in said each second group; andanalyzing the performance count of said each of the second groups of the instructions to measure one or more metrics of the program. 15. The article of manufacture according to claim 14, wherein each instruction includes an operating code portion, and the assigning each of the instructions includes assigning the instructions to said groups based on the operating code portions of the instructions. 16. The article of manufacture according to claim 14, wherein each instruction is one type of a given number of types, and the assigning each of the instructions includes assigning each type of instruction to a respective one of said plurality of groups. 17. The article of manufacture according to claim 14, wherein:the program instructions include floating point instructions; andthe analyzing includes analyzing said groups to determine the number of floating point operations performed by the program. 18. A method of measuring a performance metric of a program running on a processing unit of a processing system, the method comprising:informing a logic unit of each instruction in the program that is executed by the processing unit;assigning a weight to said each instruction;assigning, by said logic unit, each of the instructions to one of a plurality of first groups;combining, by said logic unit, the first groups of the instructions into one or more second groups of the instructions;for each of the second groups of the instructions, maintaining, by said logic unit, a performance count based on a number of times the instructions in said each second group of the instructions are executed and the weights assigned to the instructions in said each second group; andanalyzing the performance count of said each of the second groups of the instructions to determine the number of times the program executes a specified operation. 19. The method according to claim 18, wherein each instruction is one type of a given number of types, and the assigning each of the instructions includes assigning each type of instruction to a respective one of said plurality of groups. 20. The method according to claim 18, wherein:the informing includes the processing unit informing the logic unit of said each instruction in the program that is executed by the processing unit; andthe assigning a weight to said each instruction includes said logic unit assigning the weight to said each instruction.