X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=lttng%2Fcommands%2Fenable_channels.c;fp=lttng%2Fcommands%2Fenable_channels.c;h=bd732f22f20d4e4979323c1c75a32f1e0c77dee9;hp=e49559e4f416cb390c26549397f78449ab4c5886;hb=b389abbe14d653f704fcf8f952539cc5ce775c53;hpb=751667bdf3d5d79ca89a6dcf1a2d8155c8cfbc3c diff --git a/lttng/commands/enable_channels.c b/lttng/commands/enable_channels.c index e49559e4f..bd732f22f 100644 --- a/lttng/commands/enable_channels.c +++ b/lttng/commands/enable_channels.c @@ -162,12 +162,25 @@ error: */ static void init_channel_config(void) { - chan.attr.overwrite = DEFAULT_CHANNEL_OVERWRITE; - chan.attr.subbuf_size = DEFAULT_CHANNEL_SUBBUF_SIZE; - chan.attr.num_subbuf = DEFAULT_CHANNEL_SUBBUF_NUM; - chan.attr.switch_timer_interval = DEFAULT_CHANNEL_SWITCH_TIMER; - chan.attr.read_timer_interval = DEFAULT_CHANNEL_READ_TIMER; - chan.attr.output = DEFAULT_KERNEL_CHANNEL_OUTPUT; + if (opt_kernel) { + /* kernel default */ + chan.attr.overwrite = DEFAULT_CHANNEL_OVERWRITE; + chan.attr.switch_timer_interval = DEFAULT_CHANNEL_SWITCH_TIMER; + chan.attr.read_timer_interval = DEFAULT_CHANNEL_READ_TIMER; + + chan.attr.subbuf_size = DEFAULT_KERNEL_CHANNEL_SUBBUF_SIZE; + chan.attr.num_subbuf = DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM; + chan.attr.output = DEFAULT_KERNEL_CHANNEL_OUTPUT; + } else { + /* default behavior, used by UST. */ + chan.attr.overwrite = DEFAULT_CHANNEL_OVERWRITE; + chan.attr.switch_timer_interval = DEFAULT_CHANNEL_SWITCH_TIMER; + chan.attr.read_timer_interval = DEFAULT_CHANNEL_READ_TIMER; + + chan.attr.subbuf_size = DEFAULT_CHANNEL_SUBBUF_SIZE; + chan.attr.num_subbuf = DEFAULT_CHANNEL_SUBBUF_NUM; + chan.attr.output = DEFAULT_CHANNEL_OUTPUT; + } } /*