Collecting an Instruction-Based Sampling Profile

Instruction-based profiling (IBS) is similar to Event-based profiling (EBP). It collects data based on how a program behaves on processors and memory. This section demonstrates how to configure CodeAnalyst to collect an instruction-based sampling profile.

Collecting an IBS Profile

To collect an Instruction-Based Sampling profile:

  1. Select Create new project or choose a previously opened project from the Welcome window. Select Instruction-Based Sampling from the second drop-down list in the toolbar.
  2. If a new project is to be created, the New project properties dialog box opens. Assign a project name and location or browse for an existing file.

  1. The Session settings dialog box opens.
  1. Advanced step: If editing the IBS profile configuration, click Edit to open the Edit IBS Configuration dialog box.
  2. Click Show Options >>> if options are not displayed. Choose desired profiling options.

  1. Click Ok to apply selections.
  2. Click the Start icon    to launch the application and begin profiling. The task bar at the bottom of the screen displays "Sampling Session Started" and the percent completed. The Pause and Stop icons  become active. When the sampling session is complete, the application-under-test terminates and the performance data is processed. The work space then displays a module-by-module breakdown of the results in the System Data table. Select the System Graph tab to see the results in graphical form. Select the System Tasks tab to see a task-by-task breakdown of the results. Double-click on a module or process to drill down into the data.

Instruction-based sampling produces a broad range of information about program behavior in a single run. IBS fetch samples provide information about instruction fetch while IBS op samples provide information about the execution of operations (ops) that are issued from AMD64 instructions. Several views provide a more focused look at different aspects of fetch and execution behavior.

The "All Data" view displays sample counts for all IBS-derived events. Predefined views are provided to narrow down the displayed performance data to the most useful groups of IBS-derived events.

Use the drop-down list of views to select a different view of the IBS data. (The drop-down list is located next to the Manage button.) Choose IBS fetch instruction cache to see a summary of IBS attempted fetches, completed fetches, instruction cache (IC) misses and the IC miss ratio.

Choose IBS All ops from the drop-down list. This view provides a summary of the number of all IBS op samples, IBS branch (BR) samples and IBS load/store samples that were collected.

Choose IBS MEM data cache from the drop-down list. This view displays the number of load and store operations that were samples, the number of IBS data cache (DC) miss samples, the DC miss rate (DC misses divided by the number of IBS op samples), and the DC miss ratio (DC misses divided by the number of IBS load/store operations).

The Manage button can be used to further customize the IBS derived events that are shown in a view. Using the Manage button is optional. See View Management for more information.

Managing the Current View of the Data

To change the type of data displayed in the current view, click Manage. The View Management dialog box opens. Refer to the View Management section for details. The items listed in the Columns part of the View Management dialog box depend on the view configuration that is currently open for use.

Changing How IBS Data is Collected

The predefined profile configuration named "Instruction-Based Sampling" collects both IBS fetch and op data. It also uses a sampling period of 250,000 for both IBS fetch sampling and IBS op sampling. The way IBS data is collected can be changed by editing the current profile (data collection) configuration.

To change the way Instruction-Based Sampling data is collected:

  1. Click the Session settings button in the toolbar or select Tools > Sessions Settings from the menu bar.

The Session settings dialog box appears.

  1. Under Profile configuration: select the predefined profile configuration Current instruction-based profile.

The Edit IBS configuration dialog box appears.

  1. Enable or disable collection of IBS fetch or op data by selecting or unselecting the appropriate box. Change the sampling periods by editing the Fetch interval or Op interval fields. Please see Edit IBS Configuration for more detail.
  2. Click OK to apply the changes.