Feature #836
closedList of events (lttng list) presents usability problems
0%
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
Updated by David Goulet about 10 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
Updated by Jérémie Galarneau about 9 years ago
- Assignee set to Philippe Proulx
- Target version set to 2.8
Updated by Jonathan Rajotte Julien over 8 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