Modifying Hardware-based Sampling Frequency

Sometimes it is necessary to increase or decrease the sampling rate of data collection when performance
profiling
your application.  For example, you may have many small functions that execute so quickly that few samples are collected within them.  Or, perhaps you are not collecting enough cache misses to be statistically significant.  Following are the steps to increase sampling frequency in the VTune™ Amplifier XE user interface.

In hardware-based sampling (i.e., event-based sampling, or EBS), you can edit the Sample After values for the different events. First, you must make a copy of an existing analysis type or create a custom analysis. In the image below, we see the General Exploration analysis type for Intel® Core®2 processors.  The first step is to create a custom analysis type by either pressing the Copy button,



or by right-clicking in the analysis type tree area and selecting New Hardware Event-based Sampling Analysis.

custom-analysis-type-menu.png

Next, the name of the custom analysis type, both for the GUI and the command line (top two highlighted fields), can be customized.   Then, one at a time, click on the cells in the Sample After column and modify the default value.

set_sav2.png

Be aware that increasing the Sample After value will decrease your sample rate and vice versa.  Also be aware that sampling too often can cause the system to become unresponsive (causing you to reboot it to get control back).  Therefore, be careful.  Typically, decreasing the value by a factor of 10, e.g., changing 100000 to 10000, is safe. If you go much farther than that, do it incrementally and slowly.  Finally, note that increasing the sample rate increases overhead and increasing overhead inherently makes your measurements less accurate.

To reduce the sampling rate, which you may want to do when collecting data for longer periods of time (for example, more than 15 minutes), there is an easier method. When configuring the project, use the Duration time estimate drop-down list:

custom-analysis-type-duration.png

The default setting is Between 1 and 15 minutes, selecting Between 15 and 3 hours automatically scales the Sample After value by a factor of 10.

For information about configuring the sampling frequency for user-mode sampling analysis types, such as Hotspots and Concurrency, see the "Configuring Sampling Interval" topic in the VTune Amplifier XE help documentation.
Para obtener información más completa sobre las optimizaciones del compilador, consulte nuestro Aviso de optimización.