Fix: default read timer values
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 11 Mar 2013 14:09:44 +0000 (10:09 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 11 Mar 2013 14:29:25 +0000 (10:29 -0400)
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>
src/bin/lttng-sessiond/channel.c
src/bin/lttng-sessiond/trace-kernel.c
src/bin/lttng-sessiond/trace-ust.c
src/bin/lttng-sessiond/ust-app.c
src/common/defaults.h

index 7ebe4b16eb49a467dda2420892685283eaf3375b..91be4f41c8ff559296692d04decd0f7bdf4930ff 100644 (file)
@@ -49,8 +49,6 @@ struct lttng_channel *channel_new_default_attr(int dom)
        }
 
        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:
@@ -58,6 +56,8 @@ struct lttng_channel *channel_new_default_attr(int dom)
                        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
@@ -68,6 +68,8 @@ struct lttng_channel *channel_new_default_attr(int dom)
                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 */
index 48be065765b2a548892bd534cea6cb0ec8c1df10..990684be918db721a36b8265813b4d8bdcb38cb7 100644 (file)
@@ -272,8 +272,8 @@ struct ltt_kernel_metadata *trace_kernel_create_metadata(void)
        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 */
index 5e06a845242b79293d78add5d8f30d4e2bc81579..97a9c77e81f6974625877c67b4e125fde692d9e4 100644 (file)
@@ -412,8 +412,8 @@ struct ltt_ust_metadata *trace_ust_create_metadata(char *path)
        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;
index 72887633c36ce31b662c92c9240a164921bc6973..225d3f86a81a3837b4acbf9ed23c5d3cf01a9416 100644 (file)
@@ -1799,8 +1799,8 @@ static int create_ust_app_metadata(struct ust_app_session *ua_sess,
        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;
 
index 83159d7d7b5d83c2096fedc7b010f9c2c186aa5b..fca645870f2500649395f7ed0706bc129043d24e 100644 (file)
 /* 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
This page took 0.029931 seconds and 4 git commands to generate.