Patent ID: 7657875

Claim:
A method in a data processing system for collecting a plurality of metrics, the method comprising: initializing a plurality of counters in a performance monitor unit in a processor to count a plurality of different events, wherein each one of the plurality of different events is associated with a different one of a plurality of different metrics, and wherein each one of the plurality of counters is associated with a different one of plurality of different metrics; counting, by each one of the plurality of counters, occurrences of events that are associated with each one of the plurality counters during a single execution of an entire computer program that includes a plurality of branches; responsive to each determination that one of the plurality of branches has been taken during the execution of the entire computer program, generating a trace record for each one of the plurality of branches taken, wherein the counting by the plurality of counters continues without resetting the plurality of counters after each one of the plurality of branches has been taken, and wherein each trace record includes a change in a value of each one of the plurality of counters since a previous one of the plurality of branches was taken such that the plurality of different events may be identified for each branch taken during a single execution of the computer program, and wherein each trace record further includes information about the one of the plurality of branches that was taken and information about the plurality of different metrics collected during the single execution of the entire computer program, storing the trace record for each one of the plurality of branches taken, performing a symbolic resolution of memory addresses stored in the trace record for each one of the plurality of branches taken; and providing an output from the symbolic resolution to a user.