From: David Goulet Date: Fri, 12 Apr 2013 14:21:51 +0000 (-0400) Subject: Fix: use channel per domain default values X-Git-Tag: v2.2.0-rc2~45 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d92ff3ef25e70f4ffad582e24bfb581cfdcea04f;p=lttng-tools.git Fix: use channel per domain default values This is related to bug497 but does not fix it. Using the command line and the lttng_channel_set_default_attr() API call, the default read and switch timer were not correct for UST and Kernel domain since we now use specific default values for each of them. Reported-by: Mathieu Desnoyers Signed-off-by: David Goulet --- diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c index 107e70b6f..55c0ea19d 100644 --- a/src/lib/lttng-ctl/lttng-ctl.c +++ b/src/lib/lttng-ctl/lttng-ctl.c @@ -1389,8 +1389,8 @@ void lttng_channel_set_default_attr(struct lttng_domain *domain, switch (domain->type) { case LTTNG_DOMAIN_KERNEL: attr->overwrite = DEFAULT_CHANNEL_OVERWRITE; - attr->switch_timer_interval = DEFAULT_CHANNEL_SWITCH_TIMER; - attr->read_timer_interval = DEFAULT_CHANNEL_READ_TIMER; + attr->switch_timer_interval = DEFAULT_KERNEL_CHANNEL_SWITCH_TIMER; + attr->read_timer_interval = DEFAULT_KERNEL_CHANNEL_READ_TIMER; attr->subbuf_size = default_get_kernel_channel_subbuf_size(); attr->num_subbuf = DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM; @@ -1399,14 +1399,9 @@ void lttng_channel_set_default_attr(struct lttng_domain *domain, attr->tracefile_count = DEFAULT_KERNEL_CHANNEL_TRACEFILE_COUNT; break; case LTTNG_DOMAIN_UST: -#if 0 - case LTTNG_DOMAIN_UST_EXEC_NAME: - case LTTNG_DOMAIN_UST_PID: - case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN: -#endif attr->overwrite = DEFAULT_CHANNEL_OVERWRITE; - attr->switch_timer_interval = DEFAULT_CHANNEL_SWITCH_TIMER; - attr->read_timer_interval = DEFAULT_CHANNEL_READ_TIMER; + attr->switch_timer_interval = DEFAULT_UST_CHANNEL_SWITCH_TIMER; + attr->read_timer_interval = DEFAULT_UST_CHANNEL_READ_TIMER; attr->subbuf_size = default_get_ust_channel_subbuf_size(); attr->num_subbuf = DEFAULT_UST_CHANNEL_SUBBUF_NUM;