Sync with kernel code to select the output mode between splice and mmap.
Splice remains the default method.
Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
#define DEFAULT_CHANNEL_SUBBUF_NUM 8 /* Must always be a power of 2 */
#define DEFAULT_CHANNEL_SWITCH_TIMER 0 /* usec */
#define DEFAULT_CHANNEL_READ_TIMER 200 /* usec */
+#define DEFAULT_CHANNEL_OUTPUT 0 /* splice, mmap (0: SPLICE, 1: MMAP, see lttng.h) */
/*
* lttng user-space instrumentation type
} u;
};
+/*
+ * LTTng consumer mode
+ */
+enum lttng_kernel_output {
+ LTTNG_KERNEL_SPLICE = 0,
+ LTTNG_KERNEL_MMAP = 1,
+};
+
/*
* Either addr is used or symbol_name and offset.
*/
uint64_t num_subbuf; /* power of 2 */
unsigned int switch_timer_interval; /* usec */
unsigned int read_timer_interval; /* usec */
+ enum lttng_kernel_output output; /* splice, mmap */
};
/*
chan->attr.num_subbuf = DEFAULT_CHANNEL_SUBBUF_NUM;
chan->attr.switch_timer_interval = DEFAULT_CHANNEL_SWITCH_TIMER;
chan->attr.read_timer_interval = DEFAULT_CHANNEL_READ_TIMER;
+ chan->attr.output = DEFAULT_CHANNEL_OUTPUT;
error:
return chan;
chan->attr.num_subbuf = DEFAULT_CHANNEL_SUBBUF_NUM;
chan->attr.switch_timer_interval = DEFAULT_CHANNEL_SWITCH_TIMER;
chan->attr.read_timer_interval = DEFAULT_CHANNEL_READ_TIMER;
+ chan->attr.output = DEFAULT_CHANNEL_OUTPUT;
/* Init metadata */
lkm->fd = 0;
chan.attr.num_subbuf = DEFAULT_CHANNEL_SUBBUF_NUM;
chan.attr.switch_timer_interval = DEFAULT_CHANNEL_SWITCH_TIMER;
chan.attr.read_timer_interval = DEFAULT_CHANNEL_READ_TIMER;
+ chan.attr.output = DEFAULT_CHANNEL_OUTPUT;
}
/*