A trace data formatter 30 assembles trace data frames 50. These trace data frames 50 include bytes which may either serve to carry a trace data source identifier ID or trace data. A system being traced has multiple trace data sources 12, 14, 16, 18 and when the trace data source which is generating the current trace data stream changes then a trace data source identifier ID is inserted within the trace data stream.
A microprocessor a microprocessor includes: a processor module executing an instruction to generate trace information including the information of the kind and the length of the instruction; an application processing circuit operating in cooperation with the processor module to process a specific application; an address calculating circuit calculating an execution address for executing the instruction based on the information of the instruction length; a data obtaining circuit obtaining data from the application processing circuit when the calculated execution address is located within a range of a designated address; and a trace memory in which the obtained data is stored together with the trace information.