Patent ID: 7287245

Claim:
A method for real-time instruction information tracing, when a microprocessor runs a program comprising a plurality of specific instructions, the method records instruction information of the specific instructions executed by the microprocessor from a tracing start point, the method comprising: setting a trace count value as an initial value; setting a trigger count value according to the tracing start point; starting to run the program with the microprocessor; when a specific instruction is executed by the microprocessor, increasing the trace count value; if the increased trace count value is equal to or larger than the trigger count value, recording the instruction information of the specific instruction executed by the microprocessor in a buffer; when the buffer is full, stopping running the program with the microprocessor and outputting instruction information recorded in the buffer via an output interface; resetting the trigger count value according to the trace count value while the buffer is full, resetting the tracing value with the initial value, using the microprocessor to start to run the program; and when the microprocessor finishes running the program, outputting instruction information recorded in the buffer via the output interface.