[lttng-dev] [LTTng UST] [RFC] Event exclusion feature

Thibault, Daniel Daniel.Thibault at drdc-rddc.gc.ca
Tue Sep 24 12:07:30 EDT 2013


Message: 4
Date: Mon, 23 Sep 2013 08:01:17 +0000
From: "Ikaheimonen, JP" <jp_ikaheimonen at mentor.com>

> 4) When using --exclude, the event name should be a wildcard specification, and the excluded events should be a proper subset of the event specification.
> Otherwise, a warning is given, and the excluder is discarded. If the excluder fully covers the given event so that no events would be enabled, an error is given.
>
> $ lttng enable-event 'myap2*' --exclude 'myapp_comp1*'
> Warning: Event myap2*: myapp_comp1* does not exclude any events from myap2* 
> UST event myap2* created in channel mychan

"should" implies optional compliance. I think it should say "must".

> 5) When disabling an event that has been enabled with exclusions, the exclusions do not need to be specified again. 
>
> $ lttng enable-event -u -c mychan 'myapp2*' --exclude 'myapp2_comp1*' 
> UST event myapp2* excluding myapp2_comp1* created in channel mychan 
> $ lttng disable-event -u -c mychan 'myapp2*' 
> UST event myapp2* disabled in channel mychan

   The feedback should make this clear.  Replace the above with:

> $ lttng enable-event -u -c mychan 'myapp2*' --exclude 'myapp2_comp1*'
> UST event myapp2* excluding myapp2_comp1* created in channel mychan
> $ lttng disable-event -u -c mychan 'myapp2*'
> UST event myapp2* excluding myapp2_comp1* disabled in channel mychan

   This is actually in keeping with the event-name matching philosophy of enable-event.  For instance we can have:

> $ lttng enable-event -u -c mychan 'myapp2*' --exclude 'myapp2_comp1*'
> UST event myapp2* excluding myapp2_comp1* created in channel mychan
> $ lttng enable-event -u -c mychan 'myapp2_comp1*'
> UST event myapp2_comp1* disabled in channel mychan

   Allowing separate control of the two disjoint sets ("myapp2* excluding myapp2_comp1*" and "myapp2_comp1*" can have no events in common).

   Currently one can set up parallel enable-event entries that share a name key (and are distinguished only by their loglevel, loglevel-only, filter and/or exclude attributes).  They can only be disabled as a block (because disable-event admits no such command options), whereas they can be enabled individually.

   This is what I would like a session to look like (assuming that bugs 628 and 630 have been fixed, along with other feedback improvements):

$ lttng enable-event -u "ev1*" --loglevel wArNiNg
UST events ev1* are enabled in channel channel0 for loglevels up to TRACE_WARNING (4)
$ lttng list abcd
Tracing session abcd: [active]
[...]
    Events:
      ev1* (loglevel <= TRACE_WARNING (4)) (type: tracepoint) [enabled]
$ lttng disable-event -u "ev1*"
UST events ev1* are disabled in channel channel0 for loglevels up to TRACE_WARNING (4)
$ lttng list abcd
Tracing session abcd: [active]
[...]
    Events:
      ev1* (loglevel <= TRACE_WARNING (4)) (type: tracepoint) [disabled]
$ lttng enable-event -u "ev1*" --loglevel-only notice
UST events ev1* are enabled in channel channel0 for loglevel TRACE_NOTICE (5)
$ lttng list abcd
Tracing session abcd: [active]
[...]
    Events:
      ev1* (loglevel <= TRACE_WARNING (4)) (type: tracepoint) [disabled]
      ev1* (loglevel == TRACE_NOTICE (5)) (type: tracepoint) [enabled]
$ lttng disable-event -u "ev1*"
UST events ev1* are disabled in channel channel0 for loglevel TRACE_NOTICE (5)
$ lttng list abcd
Tracing session abcd: [active]
[...]
    Events:
      ev1* (loglevel <= TRACE_WARNING (4)) (type: tracepoint) [disabled]
      ev1* (loglevel == TRACE_NOTICE (5)) (type: tracepoint) [disabled]
$ lttng enable-event -u "ev1*"
UST events ev1* are enabled in channel channel0
$ lttng list abcd
Tracing session abcd: [active]
[...]
    Events:
      ev1* (loglevel <= TRACE_WARNING (4)) (type: tracepoint) [disabled]
      ev1* (loglevel == TRACE_NOTICE (5)) (type: tracepoint) [disabled]
      ev1* (type: tracepoint) [enabled]
$ lttng disable-event -u "ev1*"
UST events ev1* are disabled in channel channel0
$ lttng list abcd
Tracing session abcd: [active]
[...]
    Events:
      ev1* (loglevel <= TRACE_WARNING (4)) (type: tracepoint) [disabled]
      ev1* (loglevel == TRACE_NOTICE (5)) (type: tracepoint) [disabled]
      ev1* (type: tracepoint) [disabled]
$ lttng enable-event -u "ev1*"
UST events ev1* are enabled in channel channel0
$ lttng enable-event -u "ev1*" --loglevel-only notice
UST events ev1* are enabled in channel channel0 for loglevel TRACE_NOTICE (5)
$ lttng list abcd
Tracing session abcd: [active]
[...]
    Events:
      ev1* (loglevel <= TRACE_WARNING (4)) (type: tracepoint) [disabled]
      ev1* (loglevel == TRACE_NOTICE (5)) (type: tracepoint) [enabled]
      ev1* (type: tracepoint) [enabled]
$ lttng disable-event -u "ev1*"
UST events ev1* are disabled in channel channel0
UST events ev1* are disabled in channel channel0 for loglevel TRACE_NOTICE (5)
$ lttng list abcd
Tracing session abcd: [active]
[...]
    Events:
      ev1* (loglevel <= TRACE_WARNING (4)) (type: tracepoint) [disabled]
      ev1* (loglevel == TRACE_NOTICE (5)) (type: tracepoint) [disabled]
      ev1* (type: tracepoint) [disabled]
$ lttng enable-event -u "ev1*" --filter "arg > 12"
UST events ev1* are enabled in channel channel0 with filter 'arg > 12'
$ lttng list abcd
Tracing session abcd: [active]
[...]
    Events:
      ev1* (loglevel <= TRACE_WARNING (4)) (type: tracepoint) [disabled]
      ev1* (loglevel == TRACE_NOTICE (5)) (type: tracepoint) [disabled]
      ev1* (type: tracepoint) [enabled] [with filter 'arg > 12']
      ev1* (type: tracepoint) [disabled]
$ lttng enable-event -u "ev1*" --exclude "ev1_comp1*"
UST events ev1* excluding ev1_comp1* are enabled in channel channel0
$ lttng list abcd
Tracing session abcd: [active]
[...]
    Events:
      ev1* (loglevel <= TRACE_WARNING (4)) (type: tracepoint) [disabled]
      ev1* (loglevel == TRACE_NOTICE (5)) (type: tracepoint) [disabled]
      ev1* (type: tracepoint) [enabled] [with filter 'arg > 12']
      ev1* excluding ev1_comp* (type: tracepoint) [enabled]
      ev1* (type: tracepoint) [disabled]
$ lttng enable-event -u "ev1*" --exclude "ev1_cx*" --loglevel-only warning --filter "arg < 13"
UST events ev1* excluding ev1_cx* are enabled in channel channel0 for loglevel TRACE_WARNING (4) with filter 'arg < 13'
$ lttng list abcd
Tracing session abcd: [active]
[...]
    Events:
      ev1* excluding ev1_cx* (loglevel == TRACE_WARNING (4)) (type: tracepoint) [enabled] [with filter 'arg < 13']
      ev1* (loglevel <= TRACE_WARNING (4)) (type: tracepoint) [disabled]
      ev1* (loglevel == TRACE_NOTICE (5)) (type: tracepoint) [disabled]
      ev1* (type: tracepoint) [enabled] [with filter 'arg > 12']
      ev1* excluding ev1_comp* (type: tracepoint) [enabled]
      ev1* (type: tracepoint) [disabled]
$ lttng disable-event -u "ev1*"
UST events ev1* excluding ev1_cx* are disabled in channel channel0 for loglevel TRACE_WARNING (4) with filter 'arg < 13'
UST events ev1* are disabled in channel channel0 with filter 'arg > 12'
UST events ev1* excluding ev1_comp* are disabled in channel channel0
$ lttng list abcd
Tracing session abcd: [active]
[...]
    Events:
      ev1* excluding ev1_cx* (loglevel == TRACE_WARNING (4)) (type: tracepoint) [disabled] [with filter 'arg < 13']
      ev1* (loglevel <= TRACE_WARNING (4)) (type: tracepoint) [disabled]
      ev1* (loglevel == TRACE_NOTICE (5)) (type: tracepoint) [disabled]
      ev1* (type: tracepoint) [disabled] [with filter 'arg > 12']
      ev1* excluding ev1_comp* (type: tracepoint) [disabled]
      ev1* (type: tracepoint) [disabled]

   Clearly a lot of work needs to be done with the list command's reporting of events: it needs to use a consistent format that accommodates the optional loglevel, loglevel-only, filter and exclude attributes.  And disable-event, as long as it does not accept the loglevel, loglevel-only, filter and exclude command options, needs to report each disablement it effects (there would be a warning only if there is nothing to disable).

Daniel U. Thibault
Protection des systèmes et contremesures (PSC) | Systems Protection & Countermeasures (SPC)
Cyber sécurité pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS)
R & D pour la défense Canada - Valcartier (RDDC Valcartier) | Defence R&D Canada - Valcartier (DRDC Valcartier)
2459 route de la Bravoure
Québec QC  G3J 1X5
CANADA
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
Gouvernement du Canada | Government of Canada
<http://www.valcartier.drdc-rddc.gc.ca/>



More information about the lttng-dev mailing list