Actions
Feature #836
closedList of events (lttng list) presents usability problems
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
Actions