Kernel read timer value should be 200ms (200000us), not 200us.
UST default read timer value should be 0 (use write() system call from
applications).
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
}
chan->attr.overwrite = DEFAULT_CHANNEL_OVERWRITE;
- chan->attr.switch_timer_interval = DEFAULT_CHANNEL_SWITCH_TIMER;
- chan->attr.read_timer_interval = DEFAULT_CHANNEL_READ_TIMER;
switch (dom) {
case LTTNG_DOMAIN_KERNEL:
default_get_kernel_channel_subbuf_size();
chan->attr.num_subbuf = DEFAULT_KERNEL_CHANNEL_SUBBUF_NUM;
chan->attr.output = DEFAULT_KERNEL_CHANNEL_OUTPUT;
+ chan->attr.switch_timer_interval = DEFAULT_KERNEL_CHANNEL_SWITCH_TIMER;
+ chan->attr.read_timer_interval = DEFAULT_KERNEL_CHANNEL_READ_TIMER;
break;
case LTTNG_DOMAIN_UST:
#if 0
chan->attr.subbuf_size = default_get_ust_channel_subbuf_size();
chan->attr.num_subbuf = DEFAULT_UST_CHANNEL_SUBBUF_NUM;
chan->attr.output = DEFAULT_UST_CHANNEL_OUTPUT;
+ chan->attr.switch_timer_interval = DEFAULT_UST_CHANNEL_SWITCH_TIMER;
+ chan->attr.read_timer_interval = DEFAULT_UST_CHANNEL_READ_TIMER;
break;
default:
goto error; /* Not implemented */
chan->attr.overwrite = DEFAULT_CHANNEL_OVERWRITE;
chan->attr.subbuf_size = default_get_metadata_subbuf_size();
chan->attr.num_subbuf = DEFAULT_METADATA_SUBBUF_NUM;
- chan->attr.switch_timer_interval = DEFAULT_CHANNEL_SWITCH_TIMER;
- chan->attr.read_timer_interval = DEFAULT_CHANNEL_READ_TIMER;
+ chan->attr.switch_timer_interval = DEFAULT_KERNEL_CHANNEL_SWITCH_TIMER;
+ chan->attr.read_timer_interval = DEFAULT_KERNEL_CHANNEL_READ_TIMER;
chan->attr.output = DEFAULT_KERNEL_CHANNEL_OUTPUT;
/* Init metadata */
lum->attr.overwrite = DEFAULT_CHANNEL_OVERWRITE;
lum->attr.subbuf_size = default_get_metadata_subbuf_size();
lum->attr.num_subbuf = DEFAULT_METADATA_SUBBUF_NUM;
- lum->attr.switch_timer_interval = DEFAULT_CHANNEL_SWITCH_TIMER;
- lum->attr.read_timer_interval = DEFAULT_CHANNEL_READ_TIMER;
+ lum->attr.switch_timer_interval = DEFAULT_UST_CHANNEL_SWITCH_TIMER;
+ lum->attr.read_timer_interval = DEFAULT_UST_CHANNEL_READ_TIMER;
lum->attr.output = LTTNG_UST_MMAP;
lum->handle = -1;
metadata->attr.overwrite = DEFAULT_CHANNEL_OVERWRITE;
metadata->attr.subbuf_size = default_get_metadata_subbuf_size();
metadata->attr.num_subbuf = DEFAULT_METADATA_SUBBUF_NUM;
- metadata->attr.switch_timer_interval = DEFAULT_CHANNEL_SWITCH_TIMER;
- metadata->attr.read_timer_interval = DEFAULT_CHANNEL_READ_TIMER;
+ metadata->attr.switch_timer_interval = DEFAULT_UST_CHANNEL_SWITCH_TIMER;
+ metadata->attr.read_timer_interval = DEFAULT_UST_CHANNEL_READ_TIMER;
metadata->attr.output = LTTNG_UST_MMAP;
metadata->attr.type = LTTNG_UST_CHAN_METADATA;
/* DEFAULT_CHANNEL_SUBBUF_NUM must always be a power of 2 */
#define DEFAULT_CHANNEL_SUBBUF_NUM 4
#define DEFAULT_CHANNEL_SWITCH_TIMER 0 /* usec */
-#define DEFAULT_CHANNEL_READ_TIMER 200 /* usec */
+#define DEFAULT_CHANNEL_READ_TIMER 200000 /* usec */
#define DEFAULT_CHANNEL_OUTPUT LTTNG_EVENT_MMAP
#define DEFAULT_METADATA_SUBBUF_SIZE 4096
/* See lttng-kernel.h enum lttng_kernel_output for channel output */
#define DEFAULT_KERNEL_CHANNEL_OUTPUT LTTNG_EVENT_SPLICE
+#define DEFAULT_KERNEL_CHANNEL_SWITCH_TIMER \
+ DEFAULT_CHANNEL_SWITCH_TIMER
+#define DEFAULT_KERNEL_CHANNEL_READ_TIMER 200000 /* usec */
+
/* User space defaults */
/* Must be a power of 2 */
/* See lttng-ust.h enum lttng_ust_output */
#define DEFAULT_UST_CHANNEL_OUTPUT LTTNG_EVENT_MMAP
+#define DEFAULT_UST_CHANNEL_SWITCH_TIMER \
+ DEFAULT_CHANNEL_SWITCH_TIMER
+#define DEFAULT_UST_CHANNEL_READ_TIMER 0 /* usec */
+
/*
* Default timeout value for the sem_timedwait() call. Blocking forever is not
* wanted so a timeout is used to control the data flow and not freeze the