Trace and Profiling
Types of Trace and Profiling
- Instrumented Trace
- Instrumented trace is a solution for providing basic trace information. Through the use of TRACE() and LOG() macros, you can report program locations or variable values to MPLAB IDE while the application is running and examine them via the Trace window once the application halts.
- Jump Trace
- Jump trace is a feature on some (16-bit EP) devices that records up to the last four instruction flow changes in the code, allowing you to navigate back up a call chain. Branch/jump addresses are displayed in the Trace window (up to four entries).
- Instruction Trace
- PIC32 instruction trace uses a MIPS32 iFlowtrace™ mechanism, which is a non-intrusive hardware instruction trace. You can use this trace to capture every instruction executed by the device. The trace data is sent from the device using the pins TRCLK and TRD3:0 to the emulator. The emulator streams this data to a trace buffer on the PC that acts like a rolling FIFO.
- Function Level Profiling
- Function level profiling is a method of examining C code to determine timing information (summary on halt or streaming data) about each function. This information can show you where your program time is being spent so you can work to optimize your code.
- PC Profiling
- PC profiling is a method for examining C code to determine how much time is spent in each function. This information can show you where your program time is being spent so you can work to optimize your code. For PC profiling, every program counter (PC) trace sample is taken from the trace (data) buffer and profiled.
- PC Sampling
- PC sampling is a method of examining C code to determine how much time is spent in each function. This information can show you where your program time is being spent so you can work to optimize your code. For PC sampling, a device timer is set up to take samples of program execution and display the results in the PC profiling window. PC profiling is similar to PC sampling.