|
|||||||||||
Technical Support Support Resources
Product Information |
µVISION DEBUGGER: Performance Analyzer Data is not CorrectInformation in this article applies to:
QUESTIONI'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? ANSWERFor 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 { counter++; } 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); } } RESOLUTIONTo 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. SEE ALSOLast Reviewed: Tuesday, May 14, 2024 | ||||||||||
|
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.