Skip to main content

IAR Embedded Workbench for RX 5.20

Getting started using the profiler on instruction level

In this section:
To display instruction profiling information in the Disassembly window:
  1. When you have built your application and started C-SPY, choose View>Disassembly to open the Disassembly window, and choose Instruction Profiling>Enable from the context menu that is available when you right-click in the left-hand margin of the Disassembly window.

  2. Make sure that the Show command on the context menu is selected, to display the profiling information.

  3. Start executing your application to collect the profiling information.

  4. When the execution stops, for instance because the program exit is reached or a breakpoint is triggered, you can view instruction level profiling information in the left-hand margin of the window.

    InstructionCountinDisasmWin_Mym80_02.png

    For each instruction, the number of times it has been executed is displayed.

    Instruction profiling attempts to use the same source as the function profiler. If the function profiler is not on, the instruction profiler will try to use first trace and then PC sampling as source. You can change the source to be used from the context menu that is available in the Function Profiler window.