4.3 Filters

In addition to the normal full-text search, it is also possible to filter the Trace View directly. A filtered Trace View only shows the lines that match the specified criteria of active filters. Lines that do not match the filter criteria of active filters and are therefore of no interest are hidden.

Figure 22-9: Filtered view

Lines that match one of the active filters are lightly shaded in different colors depending on the filter. Thus it can also be recognized which trace lines satisfy the same filter.

For reasons of clarity, only the first 5 filters are marked with a pastel background color (red, yellow, green, blue, violet), since it is difficult to distinguish more than 5 colors. In general, instead of working with too many filters, it is better to define only a few filters whose filter criteria are usefully combined.

For the filtered results, line numbers and tracetimes will remain displayed in order to make the local and temporal context apparent to the user.

The filters are managed within the Filters tool in a filter list. Each filter and the filter list are edited in two different modes – global and local. Global changes affect all Trace Views that are already open or will be opened in the future. Local changes only affect the active view. For example, new filters are always created, edited, or deleted globally. This means that a newly created filter is always available to all Trace Views. Changes to the filter criteria of a filter also affect all Trace Views. Activating a filter, on the other hand, only works in the local context, that is for the active Trace View.

Figure 22-10: Filters tool – filter list with active filter IDM Errors

The checkbox preceding the filter name indicates whether a filter is active (check mark is set) or not.

The Filters tool already supplies three predefined filters in the filter list:

Filter Name

Criteria and Presentation

IDM Errors

Only lines with trace code [IE], dumpstate or ASSFAIL are shown.

Matching trace lines are shaded red.

IDM Messages

Only lines with [E:, [F:, [W: or [I: are shown.

Matching trace lines are shaded yellow.

IDM Events

Only lines with trace codes [DE] and [WE] are shown.

Matching trace lines are shaded green.

These filters are predefined and cannot be modified by the user. In addition, it is possible to define own filters (see chapter 4.3.2 “Create and Edit Filters”).

Custom filters will then appear together with the predefined filters in the filter list.

All filters, whether predefined or custom, are initially disabled. A filter is enabled once it is double-clicked on it in the list or it is selected and the filter button on/off is pressed.

These are the available actions for filters:

Create new filter. Global action, the filter is added to all open views. Newly created filters are stored persistently for the next program start.

Delete filter. Global action, the filter is removed from all open views.

Edit Filter. Global action, the changes to the filter apply to all open views.

Move the filter up in the sequence. Global or local action. As a local action, the filter sequence is changed only for the active view (see chapter 4.3.1 “Remarks on Filter Sequence”).

Move the filter down in the sequence. Global or local action. As a local action, the filter sequence is changed only for the active view (see chapter 4.3.1 “Remarks on Filter Sequence”).

Enable or disable the filter. Local action, the filter is only activated or deactivated for the current view.

4.3.1 Remarks on Filter Sequence

The list of active filters is or-combined and is always processed from top to bottom during filtering, i.e. filters positioned further up also have a higher priority. If, for example, there is a trace line on which two or more filters match, the filter with the higher priority always wins.

This may be influenced by changing the sequence of the filters and moving individual filters up or down.

The sequence in the filter list can be changed both globally and locally. As long as no Trace View has been opened in the Tracefile Analyzer, a filter is moved globally. This means that the new sequence will be applied to all Trace Views opened in the future. However, as soon as at least one Trace View has been opened – that is, there is an active Trace View – changes to the sequence only apply locally to the active Trace View. This allows to prioritize the filtering individually for each Trace View.

4.3.2 Create and Edit Filters

In order to create an own filter or edit an existing filter, the dialog Filter Properties opens:

Figure 22-11: Basic filter dialog

In this dialog a simple filter can be created. In this case, a search string (Pattern) is defined that serves as the filter criterion. The search string is applied case-insensitive.

Example

One can define ".pbadd select" as pattern to filter for the select event of the object PbAdd. Or "MasterData["customer"]" to filter for a particular item of an associative array.

To define multiple and more detailed filter criteria, the Extended option can be activated. The filter dialog will then change to display the options for advanced definitions:

Figure 22-12: Extended filter dialog

As Identifier, both simple object identifiers or longer object paths can be specified, e.g. WiMain or WiMain.GbData.PbAdd.

The indication of attribute names is possible with or without leading point, e.g. width or .width. Likewise, it is possible to give a method name with or without a leading colon, e.g. Add or :Add.

With Keyword it is possible to filter for different IDM-specific terms, which can be categorized as events, built-ins, data types, classes, functions and many more.

String can be used to filter for the complete string or a substring of a text value occurring in the trace file. A complete string can be entered with or without quotes.

Numerical filtering is defined by the Number criterion. Among others, index or parameters are taken into account. Numbers that are part of a value string are not included in the filtering.

The filter criterion Duration applies to trace files with tracetime information only. Here the criterion is a value with the unit of the smallest tracetime part.

Example

For the tracetime format [hh:mm:ss] the value is assumed to be in seconds. For the tracetime format [hh:mm:ss:uuu] the value is assumed to be in milliseconds.

Trace codes can be entered manually and comma separated. Alternatively a utility dialog Tracecode Selection can be opened via the […] button on the right. This provides an overview of the available trace codes. Moreover, the Tracefile Analyzer supports the selection here by automatically preselecting related trace codes.

Figure 22-13: Tracecode Selection

All defined filter criteria are logically combined with and, hence all must apply for a filter to match.

Additionally, each filter – whether simple or extended – can be inverted by selecting the Reverse Filter option. Then a filter matches only if the selected criteria do not apply.

Newly created filters are stored persistently for the next program start and will not be lost when the program is closed.

4.3.3 Remarks on Navigation in Filtered Views

To analyze the trace file more closely based on its filtered view, the navigation options listed in chapter 2.1.3 (Step Next, Step Prev, Step In, etc.) may be used. Trace lines which have been accessed through the navigation options but do not match any of the active filters will in this case be added to the filtered trace view so that analysis can be broadened step by step.

Figure 22-14: Filtered Trace View with trace lines 6299 and 6304 which were added by navigation and are causing the error messages.