Patent attributes
A system and method for facilitating software profiling procedures in a target device includes a target CPU that executes software instructions from target routines of the target device to perform various processing tasks. A program counter of the target device is periodically updated with a current program counter value corresponding to one of the software instructions that is being currently executed by the target CPU. A shadow register is advantageously implemented in the target device to be directly accessible by profiler software on a host computer. The shadow register is periodically updated with a profiling program counter value that corresponds to the current program counter value. The profiler software may then directly and transparently access the shadow register to read the profiling program counter value for performing the software profiling procedures.