[ltt-dev] lttv-gui filters - any quick reference available?

Tim Bird tim.bird at am.sony.com
Tue Jul 8 21:25:26 EDT 2008


Thomas E. Besemer wrote:
> Is there any "quick reference" on how to filter traces with lttv-gui?
>  
> I looked around documentation on site, can't find any.
>  
> Some very specific needs:
>  
> Would like to trace system calls/mutex operations that end up at the
> very lowest level as futex operations.  Would like to filter this by
> thread ID
> or PID.
>  
> With some hints/examples, I am probably good to go.  If there is no
> documentation, I'll be happy to write some, post it for inclusion in
> the web site.

Here is some text I wrote for an internal Sony user's guide for LTT.
This applied to ltt-gui about 2 years ago.  Sorry I didn't ever
publish it publicly somewhere, but maybe you can use this section.
I don't know if the GUI has changed much or not.

Regards,
 -- Tim

============================
The viewer provides a filtering mechanism for isolating the data you are
interested in.  The filter applies to the events window and the histogram window.

To set a filter, click on the "Insert Filter Module" button (it's icon looks like
an AND gate).  The following dialog will appear: (This filter dialog is just the
window in the top left in the screenshot)
 attachment:lttv-filter.png

A filter can be a single comparison expression, or a complex boolean expression consisting of
multiple comparisons.  You can type a filter expression directly into
the text entry box, but it is often easier to construct an expression using the drop-down lists
at the bottom of the dialog.  Each comparison in the filter expression consists of an event field element,
followed by an comparison operator ( =, !=, >, <, etc.) and a value.  Optionally, you can precede
the comparison with a '!' sign ('not') to indicate the opposite result.  Multiple comparisons
can be constructed and connected with boolean operators ( &, !, | )

To build a single comparison, select the event attribute to match, the comparison operator to use,
and enter the value to compare with in the box.  To build a multi-comparison boolean expression,
build the first comparison, then select a boolean operator at the end of the line.  When
you select a boolean operator, another line of controls for building another comparison expression
are displayed.

Once you have built an expression, click on the Add Expression button.  If you wish to add more
comparisons to your expression, select a boolean operator in the line below the filter expression text
entry box, and enter the information for the next comparison.  Then click the 'Add Expression' button.

As soon as you have created the full filter expression you wish to use, click on the "Process" button.
The event list (and histogram graph, if present) will be updated to show only those events which match
the filter expression.

Here is an example:

To filter the event list (and histogram window) on 'open' events by the process named 'find', you
would perform the following steps:
 * Open the filter window by clicking on the filter module button on the main toolbar
 * In the second drop-down list at the bottom of the dialog, select "event.name".
 * In the third drop-down list on this line, select "=".
 * In the text entry box on this line, enter the word "open"
 * In the final drop-down list on this line, select "&".  A new comparison expression line will be
 added to the dialog.
 * In the second drop-down list on this new line, select "state.process_name".
 * In the third drop-down list, select "=".
 * In the text entry box on this line, enter "find"
 * Click on "Add Expression"
 * Click on "Process"

=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Corporation of America
=============================





More information about the lttng-dev mailing list