A system and method for recording, storing, transferring and viewing trace data from a processor with an embedded trace macrocell. The system provides for compression of repetitive trace records using an algorithm which identifies compressible trace record streams, creates a highly compressed processed trace record stream and stores the processed trace record stream in trace RAM. Thereafter, the processed trace record stream may be transferred to a host computer, expanded and displayed or printed for analysis.
A tracer includes a trace memory that is stored with trace information of the program execution status of a processor; trace information compression unit that compresses the trace information into a predetermined trace format, and stores the resulting compressed information in the trace memory piece by piece cyclically; and an address register that stores the last stored address of the trace memory, analyzes the content of the trace memory in reverse order to a program executed order, searches for a start or end of the trace format, and carries out trace analysis therefrom in the program executed order.
A method for tracing of instructions executed by a processor is provided which includes providing a type of instruction to be traced and tracing at least one instruction corresponding to the type of instruction. The method further includes storing data without stopping from the tracing into a memory until the memory is full.