Project

General

Profile

Feature #836

List of events (lttng list) presents usability problems

Added by Philippe Proulx almost 6 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Target version:
Start date:
09/11/2014
Due date:
% Done:

0%

Estimated time:

Description

Since events are effectively enabled/disabled using both the desired name and a specific filter, the list of events reported by lttng list is not always useful because it doesn't give details about the original filter.

Example:

lttng create test
lttng enable-event  -u hello:world --filter 'field < 1'
lttng enable-event  -u hello:world --filter 'field < 2'
lttng enable-event  -u hello:world --filter 'field < 3'
lttng enable-event  -u hello:world --filter 'field < 4'
lttng enable-event  -u hello:world --filter 'field < 5'
lttng enable-event  -u hello:world --filter 'field < 6'
lttng enable-event  -u hello:world --filter 'field < 7'
lttng enable-event  -u hello:world --filter 'field < 8'
lttng disable-event -u hello:world
lttng enable-event  -u hello:world --filter 'field < 2'
lttng enable-event  -u hello:world --filter 'field < 4'
lttng enable-event  -u hello:world --filter 'field < 7'
lttng list test

Result:

Tracing session test: [inactive]
    Trace path: /home/eepp/lttng-traces/test-20140911-144801

=== Domain: UST global ===

Buffer type: per UID

Channels:
-------------
- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 131072
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 0
      trace file count: 0
      trace file size (bytes): 0
      output: mmap()

    Events:
      hello:world (type: tracepoint) [disabled] [with filter]
      hello:world (type: tracepoint) [enabled] [with filter]
      hello:world (type: tracepoint) [disabled] [with filter]
      hello:world (type: tracepoint) [disabled] [with filter]
      hello:world (type: tracepoint) [enabled] [with filter]
      hello:world (type: tracepoint) [disabled] [with filter]
      hello:world (type: tracepoint) [enabled] [with filter]
      hello:world (type: tracepoint) [disabled] [with filter]

Suggested output (events section isolated):

    Events:
      hello:world (type: tracepoint) [disabled]
        filter: "field < 1" 
      hello:world (type: tracepoint) [enabled]
        filter: "field < 2" 
      hello:world (type: tracepoint) [disabled]
        filter: "field < 3" 
      hello:world (type: tracepoint) [disabled]
        filter: "field < 4" 
      hello:world (type: tracepoint) [enabled]
        filter: "field < 5" 
      hello:world (type: tracepoint) [disabled]
        filter: "field < 6" 
      hello:world (type: tracepoint) [enabled]
        filter: "field < 7" 
      hello:world (type: tracepoint) [disabled]
        filter: "field < 8" 

Other suggestion:

    Events:
      1) hello:world (type: tracepoint) [disabled]
           filter: "field < 1" 
      2) hello:world (type: tracepoint) [enabled]
           filter: "field < 2" 
      3) hello:world (type: tracepoint) [disabled]
           filter: "field < 3" 
      4) hello:world (type: tracepoint) [disabled]
           filter: "field < 4" 
      5) hello:world (type: tracepoint) [enabled]
           filter: "field < 5" 
      6) hello:world (type: tracepoint) [disabled]
           filter: "field < 6" 
      7) hello:world (type: tracepoint) [enabled]
           filter: "field < 7" 
      8) hello:world (type: tracepoint) [disabled]
           filter: "field < 8" 

If always ordered the same way, this could be possible:

lttng disable-event -u 5
lttng enable-event  -u 4,6

Other idea:

lttng enable-event -u hello:world --filter 'field < 1' --alias bob
lttng enable-event -u hello:world --filter 'field < 2'
lttng enable-event -u hello:world --filter 'field < 3'
lttng enable-event -u hello:world --filter 'field < 4' --alias yeah
lttng enable-event -u hello:world --filter 'field < 5'
lttng enable-event -u hello:world --filter 'field < 6'
lttng enable-event -u hello:world --filter 'field < 7'
lttng enable-event -u hello:world --filter 'field < 8'

The list would look like:

    Events:
      1) hello:world (type: tracepoint) [disabled]
           alias:  bob
           filter: "field < 1" 
      2) hello:world (type: tracepoint) [enabled]
           filter: "field < 2" 
      3) hello:world (type: tracepoint) [disabled]
           filter: "field < 3" 
      4) hello:world (type: tracepoint) [disabled]
           alias:  yeah
           filter: "field < 4" 
      5) hello:world (type: tracepoint) [enabled]
           alias:  hello
           filter: "field < 5" 
      6) hello:world (type: tracepoint) [disabled]
           filter: "field < 6" 
      7) hello:world (type: tracepoint) [enabled]
           filter: "field < 7" 
      8) hello:world (type: tracepoint) [disabled]
           filter: "field < 8" 

So that you can do:

lttng disable-event -u --alias bob
lttng enable-event  -u --alias hello
lttng enable-event  -u --alias bob

Related issues

Is duplicate of LTTng-tools - Feature #630: 'lttng list session_name' should list the filters attached to the eventsResolved09/11/2013

Actions
#1

Updated by David Goulet almost 6 years ago

  • Tracker changed from Bug to Feature

This is a limitation. You can enable multiple events with filters and loglevel but when disabling you can only use a "name" and thus all events matching that name are disabled.

I believe this should be resolve soon with the syscall tracing hopefully in 2.6.

The list issues is a feature request. See #630

#2

Updated by David Goulet almost 6 years ago

  • Status changed from New to Confirmed
#3

Updated by Jérémie Galarneau almost 5 years ago

  • Assignee set to Philippe Proulx
  • Target version set to 2.8
#4

Updated by Jonathan Rajotte Julien over 4 years ago

  • Status changed from Confirmed to Resolved

Starting from 2.8 the filter expression is available on the command line and the mi.

E.g

Buffer type: per UID

Channels:
-------------
- channel0: [enabled]

    Attributes:
      overwrite mode: 0
      subbufers size: 131072
      number of subbufers: 4
      switch timer interval: 0
      read timer interval: 0
      trace file count: 0
      trace file size (bytes): 0
      discarded events: 0
      lost packets: 0
      output: mmap()

    Events:
      * (type: tracepoint) [enabled] [filter: 'test']

<events>
  <event>
    <name>*</name>
    <type>TRACEPOINT</type>
    <enabled>true</enabled>
    <filter_expression>test</filter_expression>
    <exclusions/>
  </event>
</events>

Cheers

Also available in: Atom PDF