Patent ID: 6253338
Filing Date: 2001-06-26
Classification: G06F

Abstract:
A method for tracing hardware counters in a data processing system, said method comprising the steps of:executing a basic block of code from a current process;programming monitor mode control registers to instruct one or more hardware counters to count specified events;counting said specified events by said one or more hardware counters during said current process;generating a trace interrupt during said counting of specified events;responsive to generating said trace interrupt, determining if said current process is selected to be traced, wherein if said current process is selected to be traced, storing contents of said one or more hardware counters in a trace buffer;determining for a kernel-mode-to-user-mode transition if said block of code belongs to a new process from current process information, wherein if said block of code belongs to a new process, further determining if said new process is selected to be traced such that a next block address may be determined following said trace interrupt;wherein in response to determining that said new process is to be traced, storing the process information associated with said new process into a trace buffer and setting a next block address equal to a transition address; andwherein, in response to determining that said new process is not to be traced, setting a next block address equal to a transition address.