Bug #1038
openEnabling all events for the JUL domain, while having disabled events
0%
Description
In the JUL domain, if you enable all events (lttng enable-event -a -j) while having events that are disabled, all the events (even those that were disabled) are going to be enabled. This is not what happens in the UST domain. In the UST domain, if you have disabled events and you enable all UST events (lttng enable-event -a -u), the '*' will be added and enabled, but the events that were previously disabled are still disabled. I think the desired behaviour is the one from UST, not 100% sure though.
Updated by Anonymous over 8 years ago
What do you mean by "while having events that are disabled"? I tried disabling events in advance and it doesn't seem to work:
$ lttng create
Session auto-20160706-161639 created.
Traces will be written in /home/alexandre/lttng-traces/auto-20160706-161639
$ lttng disable-event -u myevent
Error: myevent of type any : No channel found in the session (channel channel0, session auto-20160706-161639)
$ lttng enable-channel -u mychannel
UST channel mychannel enabled for session auto-20160706-161639
$ lttng disable-event -u myevent -c mychannel
Error: myevent of type any : UST event not found (channel mychannel, session auto-20160706-161639)
and with the JUL domain you cannot even create channels:
$ lttng create
Session auto-20160706-161711 created.
Traces will be written in /home/alexandre/lttng-traces/auto-20160706-161711
$ lttng disable-event -j myevent
Error: myevent of type any : No channel found in the session (channel channel0, session auto-20160706-161711)
$ lttng enable-channel -j mychannel
Error: Undefined command or invalid arguments
This is with LTTng master.
Updated by Jonathan Rajotte Julien over 8 years ago
From what I recall:
lttng create
lttng enable-event -u test
lttng disable-event -u test
lttng enable-event -u -a
lttng enable-event -j test
lttng disable-event -j test
lttng enable-event -j -a
Cheers
Updated by Bruno Roy over 8 years ago
Here are the commands I did (those are with version 2.7.2, but I tried with 2.8.0 and master):
$ lttng create jul
Session jul created.
Traces will be written in /home/bruno/lttng-traces/jul-20160706-163027
$ lttng enable-event foo -j
JUL event foo enabled$ lttng disable-event foo -j
JUL foo of type any disabled in channel channel0 for session jul
$ lttng list jul
(...)
Events (Logger name):
---------------------
- foo [disabled] [filter: 'logger_name "foo"']
$ lttng enable-event -aj
All JUL events are enabled in channel channel0
$ lttng list jul
(...)
Events (Logger name):
---------------------
- foo [enabled] [filter: 'logger_name "foo"']
- * [enabled]
In the end result, the logger foo is enabled. I'm not sure this is a bug, but the behaviour is different in UST, for the same scenario (the single event is still disabled).