From: David Goulet Date: Fri, 23 Sep 2011 16:54:49 +0000 (-0400) Subject: Add default ust channel attributes X-Git-Tag: v2.0-pre14~14 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0b0dd29a48f5855eeb7cda99efaa079d8353eb6b;p=lttng-tools.git Add default ust channel attributes Signed-off-by: David Goulet --- 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; } }