}
switch (channel_type) {
case PER_CPU_CHANNEL:
- transport_name = chan_param.overwrite ?
- "relay-overwrite" : "relay-discard";
+ if (chan_param.output == LTTNG_KERNEL_SPLICE) {
+ transport_name = chan_param.overwrite ?
+ "relay-overwrite" : "relay-discard";
+ } else if (chan_param.output == LTTNG_KERNEL_MMAP) {
+ transport_name = chan_param.overwrite ?
+ "relay-overwrite-mmap" : "relay-discard-mmap";
+ } else {
+ return -EINVAL;
+ }
fops = <tng_channel_fops;
break;
case METADATA_CHANNEL:
- transport_name = "relay-metadata";
+ if (chan_param.output == LTTNG_KERNEL_SPLICE)
+ transport_name = "relay-metadata";
+ else if (chan_param.output == LTTNG_KERNEL_MMAP)
+ transport_name = "relay-metadata-mmap";
+ else
+ return -EINVAL;
fops = <tng_metadata_fops;
break;
default:
LTTNG_KERNEL_FUNCTION = 2,
};
+/*
+ * LTTng consumer mode
+ */
+enum lttng_kernel_output {
+ LTTNG_KERNEL_SPLICE = 0,
+ LTTNG_KERNEL_MMAP = 1,
+};
+
/*
* LTTng DebugFS ABI structures.
*/
uint64_t num_subbuf;
unsigned int switch_timer_interval; /* usecs */
unsigned int read_timer_interval; /* usecs */
+ enum lttng_kernel_output output; /* splice, mmap */
};
/*