From 0b0dd29a48f5855eeb7cda99efaa079d8353eb6b Mon Sep 17 00:00:00 2001 From: David Goulet Date: Fri, 23 Sep 2011 12:54:49 -0400 Subject: [PATCH] Add default ust channel attributes Signed-off-by: David Goulet --- include/lttng-share.h | 7 +++++++ lttng/commands/enable_channels.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/lttng-share.h b/include/lttng-share.h index 5154b90a5..f6169bfd0 100644 --- a/include/lttng-share.h +++ b/include/lttng-share.h @@ -44,6 +44,13 @@ /* See lttng-kernel.h enum lttng_kernel_output for channel output */ #define DEFAULT_KERNEL_CHANNEL_OUTPUT LTTNG_EVENT_SPLICE +/* User space defaults */ + +/* Must be a power of 2 */ +#define DEFAULT_UST_CHANNEL_SUBBUF_SIZE 4096 /* bytes */ +/* Must be a power of 2 */ +#define DEFAULT_UST_CHANNEL_SUBBUF_NUM 4 + /* * Takes a pointer x and transform it so we can use it to access members * without a function call. Here an example: diff --git a/lttng/commands/enable_channels.c b/lttng/commands/enable_channels.c index 13511cc86..c5887d07b 100644 --- a/lttng/commands/enable_channels.c +++ b/lttng/commands/enable_channels.c @@ -177,8 +177,8 @@ static void init_channel_config(void) 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.subbuf_size = DEFAULT_UST_CHANNEL_SUBBUF_SIZE; + chan.attr.num_subbuf = DEFAULT_UST_CHANNEL_SUBBUF_NUM; chan.attr.output = DEFAULT_CHANNEL_OUTPUT; } } -- 2.34.1