Metadata channel properties are not configurable (kernel domain)
It is possible to explicitly create a kernel channel named metadata in the kernel domain.
$ lttng enable-channel -k metadata --num-subbuf 256 Kernel channel metadata enabled for session youssef_robert
This channel can be listed:
- metadata: [enabled] Attributes: Event-loss mode: discard Sub-buffer size: 1048576 bytes Sub-buffer count: 256 Switch timer: inactive Read timer: 200000 µs Monitor timer: 1000000 µs Blocking timeout: 0 µs Trace file count: 1 per stream Trace file size: unlimited Output mode: splice Statistics: Discarded events: 0 Event rules: None
It is surprisingly possible to add event rules to such a channel.
lttng enable-event -k -a -c metadata All Kernel events are enabled in channel metadata
Predictably, since this channel is not identified as a special metadata channel, the configuration is not used during the creation of the metadata stream.
Instead, a dedicated ltt_kernel_metadata field is used. This field is initialized during the creation of the kernel session with a set of default attributes.
It is unclear to me if this ever worked since I couldn't find a trace of the code that should handle this.