3.3.1. Setting the sampling rate

The sampling rate lets the RealView Trace 2 data capture unit know how often to report what instruction is currently being executed. The ARM Profiler logs every instruction as is it is executed, so setting a sampling rate will not affect the accuracy of the reported call chain sequence. Sampling rate does affect the accuracy of the time measurement for each instruction, as the ARM Profiler reports which instruction being executed at intervals dictated by the sampling rate. The default value, 1021, tells the RealView Trace 2 unit to report the instruction at every 1021 cycle boundary. Setting the rate higher ensures that you do not overflow the trace port with too much data, while the smallest values generate the most accurate timing values.

You can enter any integer value between 1 and 1024 into the field directly or use the sampling rate drop-down menu to set the sampling rate for the profiling run to one of the following preset values:


  • To reduce the risk of trace port overflows, the default sampling rate is set to 1021.

  • The drop-down menu is populated with prime numbers to ensure a more random sampling of executed instructions. This avoids the potential of a divisible sampling rate matching execution loops. Some targets have a limited capacity for the sampling rate that can be set.

Cycle Accurate provides the highest level of accuracy, as it records the cycle count for every instruction. If Cycle Accurate is selected for a target that does not allow it, the ARM Profiler sets it to the lowest supported value and gives you a message similar to the following: Target does not support sample rate 1 - using 16.

Setting the sampling rate to Estimated provides maximum performance for smaller trace port widths, but turns sampling off. Just like profiling using an RTSM, the ARM Profiler estimates time for each instruction based on the instruction type and reports timing data based on these estimates, but provides no visibility to actual hardware stall behavior. This is not as accurate as sampling and does not provide insight into what instructions are performing more slowly than expected.


Estimated does not use the cycle accurate mode of the Embedded Trace Macrocell (ETM) port, so can be used with narrower ETM ports to reduce overflows.


The Cortex-M3 allows a sampling rate of either 64 or 1024. The ARM Profiler uses one of these two values based on the number chosen from this drop-down menu. Any values below 64 are converted to 64 and values above 64 are converted to 1024. The Cortex-M3 does not support the Estimated sampling setting.

Copyright © 2007, 2008 ARM Limited. All rights reserved.ARM DUI 0414C