Keil Logo

PerformanceAnalyze

Syntax Description
PerformanceAnalyze Displays all currently defined performance analyzer ranges and the timing results for these ranges.
PerformanceAnalyze start , end Defines a new range to add to the performance analyzer.
PerformanceAnalyze KILL * Removes all currently defined performance analyzer ranges.
PerformanceAnalyze KILL item , item Removes one or more currently defined performance analyzer ranges.
PerformanceAnalyze RESET Resets the performance analyzer.

You may use the performance analyzer in µVision3 to tune your target programs for maximum performance. You specify the parts of your program you want to analyze and the performance analyzer gathers execution statistics for them during program execution. The fastest, slowest, and average execution times are maintained for each part of your program you chose to analyze.

You may analyze up to 256 ranges of code. The performance analyzer records the number of times a range of code is executed as well as the amount of time spent in each range.

A range is simply an address range. It normally starts at the first instruction in a function and ends at the last instruction in that function. However, you can specify a range that includes only a few instructions from any part of your target program.

As your program runs, the results of the performance analyzer display in the Performance Analyzer window.

The following commands are available for working with the performance analyzer.

PA

The PA command, when entered with no additional arguments, displays each defined performance analyzer address range, its index number (used to remove a specific range), the execution count, and the minimum, maximum, and total execution time (in clock cycles).

PA start , end

The PA command, when followed by the name of a function in your target program or by an address range, creates a new address range to analyze. If start is the name of a function, µVision3 automatically obtains the starting and ending address for the function. If start is an address, end must specify the ending address of the range to analyze. Your target application should be compiled with full debug information enabled to best support performance analysis.

Note

  • The Performance Analyzer in the ARM simulator does not require any setup, since it is always active for the whole application. Therefore the PA command is not needed.
  • Performance analyzer address ranges must have unique entry and exit points and may not include an intermediate return (RET) instruction. A new address range may not overlap an existing range.
PA KILL *

The PA KILL * command removes all address ranges from the performance analyzer.

PA KILL item

The PA KILL command, when followed by an index number, removes the corresponding address range from the performance analyzer. µVision3 assigns an index to each address range and function you add to the performance analyzer. You may display these numbers using the PA command.

PA RESET

The PA RESET command clears all recorded information for all defined address ranges. You may use this command to begin recording after your target program has run a while.

You may also define program ranges for the performance analyzer using the Setup Performance Analyzer dialog. This dialog opens via the main menu Debug — Performance Analyzer….

Example
>PA main                         /* Define a range for main()   */
>PA timer0                       /* Define a range for timer0() */
>PA clear_records                /* Define more ranges          */
>PA measure_display
>PA save_current_measurements
>PA read_index
>PA set_time
>PA set_interval
>
>PA                              /* display all PA ranges       */
  0: main: (FF01EF-FF03B6)       /* FF01EF = C:0x01EF           */
  1: timer0: (FF006A-FF0135)
  2: clear_records: (FF01C0-FF01EE)
  3: measure_display: (FF07E7-FF084A)
  4: save_current_measurements: (FF000E-FF0069)
  5: read_index: (FF0136-FF01BF)
  6: set_time: (FF084B-FF08CA)
  7: set_interval: (FF08CB-FF09A5)

/* After execution of the user program ... */

>PA                              /* Display ranges and stats   */
  0: main: (FF01EF-FF03B6)
     count=1, min=-1, max=0, total=167589
  1: timer0: (FF006A-FF0135)
     count=2828, min=33, max=254, total=226651
  2: clear_records: (FF01C0-FF01EE)
     count=1, min=27086, max=27086, total=27086
  3: measure_display: (FF07E7-FF084A)
     count=10, min=19495, max=19503, total=185027
  4: save_current_measurements: (FF000E-FF0069)
     count=491, min=205, max=209, total=100665
  5: read_index: (FF0136-FF01BF)
  6: set_time: (FF084B-FF08CA)
  7: set_interval: (FF08CB-FF09A5)
>
>PA KILL 7                       /* Remove set_interval        */
>PA KILL 6                       /* Remove set_time            */
>PA KILL 5                       /* Remove read_index          */
>PA
  0: main: (FF01EF-FF03B6)
     count=1, min=-1, max=0, total=167589
  1: timer0: (FF006A-FF0135)
     count=2828, min=33, max=254, total=226651
  2: clear_records: (FF01C0-FF01EE)
     count=1, min=27086, max=27086, total=27086
  3: measure_display: (FF07E7-FF084A)
     count=10, min=19495, max=19503, total=185027
  4: save_current_measurements: (FF000E-FF0069)
     count=491, min=205, max=209, total=100665
>
>PA RESET                        /* Clear all recorded information */
>PA
  0: main: (FF01EF-FF03B6)
  1: timer0: (FF006A-FF0135)
  2: clear_records: (FF01C0-FF01EE)
  3: measure_display: (FF07E7-FF084A)
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.