Exploring Memory Analysis Views > Exploring the Instances View > Filtering Data in the Instances View
There are two ways to filter the data in Instances view:
• You can use the text field above the table to filter by class, which narrows what is displayed in the view, but does not affect the underlying data set.
• You can also use the Set Filters dialog to set one or more filters by class. Using this method narrows or expands the underlying data set.
To filter the Instances view by class:
1 Type a pattern or comma-separated list of patterns in the Filter Classes text box.
2 Press Enter to apply the filter.
The table refreshes, listing only the classes that meet the criteria you entered. The number of classes/total classes is displayed beside the text field. Note that the chart is not affected.
Note The filters you enter in this field are saved and can be used later by clicking the down arrow and choosing them from the drop-down list.
To filter the Instances view using the Set Filters dialog:
1 Click
the filter icon in the toolbar.
2 Add filters to the New Filters list in one or more of the following ways:
• Click a line in the list to highlight it and type a pattern.
• Click in a line in the list to highlight it, then click the browse button to navigate to a class or method, and double-click it.
• Click Add Current Filters to add the filters that are currently in effect in the Instances view.
3 If you want to change the action for a filter, click in the Action column and choose the Include or Exclude.
4 Click OK when you have finished adding filters.
The view refreshes and displays only the instances that meet the filter criteria you have set. The bar chart is redrawn to reflect the matched instances.
Filters are case-sensitive and blanks are not allowed. You can use an asterisk (*) as a wild card; it matches any character, including the package separator. If you specify the code in a shorthand or partial form, JProbe automatically changes it to canonical form. The change may not be exactly what you desire, so be sure to verify it. JProbe does not check to see whether the filter actually matches anything in your code. For example, if you make a typing error in your package name, nothing in your code will match the filter and so the filter is not applied.
The following table contains common syntax and describes how JProbe interprets it: