2 CPU Utilization Running Trace
The time spent by the CPU doing trace and trace-related work is variable. The trace code will send data each time the context is switched, so heavy task switching will create more trace data, thus more time is spent in trace code and sending the data over UART. Consequently the UART speed will also affect the amount of time spent doing trace and trace-related work.
Typical number of reported sorts per second for Bubble and Quick sort are
summarized below.
Trace Enabled (TE) | Trace Disabled (TD) | |
---|---|---|
Bubble Sort | 680 ± 4 | 706 ± 2 |
Quick Sort | 1638 ± 10 | 1694 ± 2 |
From the results listed above the trace related CPU load can be estimated as
. This gives an approximation of percentage of CPU time spent on trace activity since
in these modes sorting and trace consume close to 100% of the total CPU time.
Bubble Sort | Quick Sort |
---|---|
3.8 ± 0.3% | 3.4 ± 0.5 % |
Trace can be turned off by commenting out the line in
FreeRTOSConfig.h
#define _trace_enabled_
Remember to Clean Solution and Rebuild Solution in Atmel Studio after doing changes in FreeRTOSConfig.h.