摘要 |
A method for real-time instruction information tracing for recording the information about a plurality of specific instructions executed by a processor from a tracing start point in the history of running a program, wherein the program contains the specific instructions. The method contains the following step.A trace count value is set to an initial value. A trigger count value is set according to the tracing start point. The processor starts running the program. The trace count value is increased whenever a specific instruction executed by the processor. If the increased trace count value is equal to or larger than the trigger count value, record the instruction information about the specific instruction executed by the processor in a buffer; if the buffer is full, stop running the program and output the instruction information stored in the buffer via an output interface. During this time reset the trigger count value according to the trace count value, reset the trace count value as the initial value, and then start running the program with the processor again. When the processor has finished running the program, output the instruction information stored in the buffer via the output interface.
|