Go to main content
Oracle® Developer Studio 12.5: Performance Analyzer

Exit Print View

Updated: June 2016
 
 

Filtering Data

When you open an experiment you see all the profiling data from your program. Filtering enables you to temporarily remove uninteresting data from view so you can focus on a specific area or characteristic of your program.

A filter that you apply in one view affects all views. For example, you can specify a time period filter in the Timeline view so other views such as Functions only show metrics pertaining to the filtered time period. Select one or more items in a view and then select filters one at a time to specify the data that you want to include in the view.

You can filter in several ways:

  • Click the Filter button to open a list of filters that can be applied for the selected items in the current data view.

  • Right-click an item in a data view or press Shift-F10 while it is selected, and then select a filter to apply.

  • Use the Filters panel in the lower left corner of Performance Analyzer to see the filters you have applied and add or remove them.

You can combine filters to display metrics from highly specific areas of your program's run. For example you could apply a filter in the Functions view and a filter in the Timeline view to focus on call stacks that include a particular function during a specific period of time in the program's run.

When you use filters, the data is filtered in all Performance Analyzer views except the MPI Timeline, which has a separate filtering mechanism that does not interact with the other data views.

Experienced users of Performance Analyzer can also use the Advanced Custom Filters dialog box to edit filter expressions to create custom filters to precisely define the data to be displayed.


Note -  The filters described here are independent of the MPI filtering described in MPI Timeline Controls and MPI Chart Controls. These filters do not affect the MPI Timeline view and the MPI Chart view.

Using Filters

Filters are available in most data views in Performance Analyzer. You access them using the Filter button on the toolbar or in the Active Filters panel, or by right-clicking with the mouse or by pressing Shift-F10 on the keyboard. When you add a filter, the data is immediately filtered.

In general, you use filters by selecting one or more items in the view that you want to focus on, and selecting the appropriate filter. For most views the filters enable you to include or not include the data that meets the criteria named in the filter. This enables you to use the filters to either focus on data from a particular area of your program, or exclude data from a particular area.

    Some ways you can use filters include:

  • Add multiple filters to narrow down the data. The filters are combined in a logical AND relationship, which requires the data to match all of the filters.

  • Add a filter in one view and then examine the filtered data in another view. For example, in the Call Tree view you can find the hottest branch, select “Add Filter: Include only stacks containing the selected branch”, and then go to the Functions view to see metrics for the functions called in that code branch.

  • Add multiple filters from multiple views to create a very specific set of data.

  • Use filters as a basis for creating advanced custom filters. See Using Advanced Custom Filters.

Using Advanced Custom Filters

When you add filters in Performance Analyzer data views, filter expressions are generated and are immediately applied to filter the data. The generated filter expressions are visible in the Advanced Custom Filter dialog box. Experienced users can use these generated filter expressions as a beginning point for creating customized filters.

    To create a custom filter:

  1. Open the Advanced Custom Filter dialog box by doing one of the following:

    • Click the Filter button and select Add Filter: Advanced Custom Filter

    • Choose Tools ⇒ Filters ⇒ Add Filter: Advanced Custom Filter

  2. Click in the Filter Specification text box and edit the filters. See below for more information about the filters.

  3. Use the arrow buttons to undo or redo edits if necessary.

  4. Click OK to filter the data according to the filter expressions and close the dialog box.

The Filter Specification panel shows the filter expressions for filters you previously applied by selecting them in Performance Analyzer data views. You can edit these filters, and use the arrow buttons at the top to undo and redo your edits. You can also use Ctrl-Z to undo and Shift-Ctrl-Z to redo as you would in a text editor. The filters only affect the data views when you click OK.

Place each new filter on a new line beginning with && the logical AND operator. Experiment data must match the first filter AND the second filter AND the third filter, and so on, in order to be displayed.

You can change && to || if you want data to match the first filter OR the second filter, for example.

Filter expressions use standard C relational operators (==, >=, &&, ||, and so on) along with keywords that are specific to the experiment. The keywords that you can use in your experiment are shown in the Keywords panel of the Advanced Custom Filters dialog box.

Search the Performance Analyzer help for more information about filter keywords and filter expressions.

The filter expression syntax is the same as that used for filtering with er_print. See Expression Grammar for information about filter expressions.

Using Labels for Filtering

Labels are names you can assign to a portion of an experiment. Using the er_label command, you can assign a label name to a period of time in an experiment and the label persists with the experiment. You can use the label to filter the experiment data with the er_print command or Performance Analyzer to include or exclude the data collected during the labeled time period.

See Labeling Experiments for information about how to use the er_label utility to create labels.

In Performance Analyzer you can filter data from the labeled time period in the Advanced Custom Filter dialog box. Type the label name in the Filter Specification panel and click Apply to filter the data specified by the label. You do not need to use any numerical comparison because the label acts as a nickname for a filter expression that uses a numerical comparison with the TSTAMP keyword. You can combine the label with other filters in the Filter Specification panel by adding it on a separate line preceded by &&.

You can see if there are labels assigned to an experiment that is open in Performance Analyzer in the Keywords panel of the Advanced Custom Filters dialog box.. You can also use the er_print -describe command to see the same information. Labels are listed first in the display and include the actual filter expression with the TSTAMP keyword that is implemented by the label.

After applying a label filter, you can click the Timeline view to see data is removed in the intervals that were defined by the label. The data is also filtered in other data views that support filtering.