Calibration

The VTune(TM) Performance Analyzer does not know the frequency with which the events occur in your application and system. Hence, for Event-Based Sampling (EBS), the VTune analyzer uses a calibration mechanism to adjust the sampling frequency (the Sample After value) and collect the appropriate number of samples. The calibration mechanism ensures the target number of samples is collected over the entire duration of the Activity. The target number of samples is calculated by multiplying the samples per second (the inverse of the Sampling Interval) by the Duration. Calibrating the Sample After value enables minimizing the sampling overhead.

During a calibration run, the sampling collector is executed using all specified parameters, but no samples are recorded. This run is only used to determine the total number of events that occur in a specified period of time. Once it determines the total number of events, the sampling collector calculates the Sample After value to ensure the target number of samples are collected in the specified Activity Duration.

The sampling data collector then runs the Activity again using the calibrated Sample After values. This time the samples are recorded and an Activity result is generated.

By default, calibration is enabled for the Clockticks and Instruction Retired events only. For other events, it is disabled.

What happens when calibration is enabled:

The sampling collector determines the quantity of runs depending on the events you select for calibration. Some events are incompatible, that is, data on these events cannot be collected during the same run.

If two events that require two runs are selected for event-based sampling with the Calibrate Sample After value option enabled, the VTune analyzer:

  1. Launches the sampling collector.

  2. Launches your application (if you specified one).

  3. Calibrates the Sample After value of the first set of events.

  4. Stops your application.

  5. Launches your application.

  6. Collects data based on the Sample After value calculated in step 3.

  7. Stops your application.

  8. Repeats steps 2-7 for the remaining set of events.

To enable/disable calibration from the command line:

use -cal | -calibration <yes | no>.

Command-line example:

>vtl activity -c sampling -o "-cal yes" run

To choose a calibration option:

  1. From the Configure Sampling dialog box, select the General tab.

  2. Under the event-based sampling mechanism radio button, choose one of the following options:

Option

Description

Don't Calibrate Sample After value

Sample After value is not calibrated for any event, even if some of them have calibration enabled. By default, this option is enabled.

Calibrate Sample After value for all the selected events

Sample After value is calibrated for all the selected events, even if some of them have calibration disabled.

Calibrate Sample After value based on the selected event properties

Sample After value is calibrated only for those events that have the calibration setting enabled.  

This option is useful if you have experience with configuring the events in a separate file. For more information, contact technical support http://software.intel.com/en-us/articles/intel-vtune-performance-analyzer-for-linux-kb/

 

  To disable or enable calibration for specific events:

  1. Click the Events tab in the Configure Sampling dialog box.

  2. From the Event Groups pull down list, select the event group in which the event resides.
    Events from the selected event group appears in the Available Events field.

  3. Select and add the event to the Selected Events list.

note

For the Clockticks event, the VTune analyzer runs the Activity with the sampling collector only once and does not calibrate the Sample After value. Unlike other events, the frequency of the Clockticks event is predictable.

Other Sampling Configuration Options

More about Event-based Sampling