Keil Logo

µVISION DEBUGGER: Performance Analyzer Data is not Correct

Information in this article applies to:

  • µVision Version 2.x


I'm using the Performance Analyzer in the µVision Debugger to measure the time spent in some of my program's functions.

I have a short routine that only reads and writes values. There is no condition code in this function, yet the timings recorded by the performance analyzer vary greatly. 

What would cause this?


For a function, the Performance Analyzer calculates the time spent in the function starting when the function is entered and ending when the function exits. This time MAY include time spent in interrupt service routines for interrupts that occur while that function executes. The following program demonstrates this effect:

#include <reg51.h>

static long counter = 0;

void ISR (void) interrupt 0

void test_loop (char *buf)
buf [0] = P1;
buf [1] = P3;

void main (void)
char b [2];

EX0 = 1;  // Enable External Int 0
IT0 = 1;  // Edge-triggered
EA = 1;   // Enable Interrupts

while (1)
  test_loop (b);


To avoid this effect, add your interrupt service routines to the Performance Analyzer. Then, the time spent in the ISRs will not be included in the time measurements of other functions.


Last Reviewed: Thursday, January 14, 2021

Did this article provide the answer you needed?
Not Sure
  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.