Three new modules to configure the ring buffer output for mmap support.
Add the RING_BUFFER_OUTPUT_TEMPLATE macro to configure the ring buffer
output instead of being splice by default.
Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
obj-m += ltt-ring-buffer-client-discard.o
obj-m += ltt-ring-buffer-client-overwrite.o
obj-m += ltt-ring-buffer-metadata-client.o
+obj-m += ltt-ring-buffer-client-mmap-discard.o
+obj-m += ltt-ring-buffer-client-mmap-overwrite.o
+obj-m += ltt-ring-buffer-metadata-mmap-client.o
obj-m += ltt-relay.o
ltt-relay-objs := ltt-events.o ltt-debugfs-abi.o \
#define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD
#define RING_BUFFER_MODE_TEMPLATE_STRING "discard"
+#define RING_BUFFER_OUTPUT_TEMPLATE RING_BUFFER_SPLICE
#include "ltt-ring-buffer-client.h"
MODULE_LICENSE("GPL and additional rights");
--- /dev/null
+/*
+ * ltt-ring-buffer-client-discard.c
+ *
+ * Copyright (C) 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * LTTng lib ring buffer client (discard mode).
+ *
+ * Dual LGPL v2.1/GPL v2 license.
+ */
+
+#include <linux/module.h>
+#include "ltt-tracer.h"
+
+#define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD
+#define RING_BUFFER_MODE_TEMPLATE_STRING "discard-mmap"
+#define RING_BUFFER_OUTPUT_TEMPLATE RING_BUFFER_MMAP
+#include "ltt-ring-buffer-client.h"
+
+MODULE_LICENSE("GPL and additional rights");
+MODULE_AUTHOR("Mathieu Desnoyers");
+MODULE_DESCRIPTION("LTTng Ring Buffer Client Discard Mode");
--- /dev/null
+/*
+ * ltt-ring-buffer-client-overwrite.c
+ *
+ * Copyright (C) 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * LTTng lib ring buffer client (overwrite mode).
+ *
+ * Dual LGPL v2.1/GPL v2 license.
+ */
+
+#include <linux/module.h>
+#include "ltt-tracer.h"
+
+#define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_OVERWRITE
+#define RING_BUFFER_MODE_TEMPLATE_STRING "overwrite-mmap"
+#define RING_BUFFER_OUTPUT_TEMPLATE RING_BUFFER_MMAP
+#include "ltt-ring-buffer-client.h"
+
+MODULE_LICENSE("GPL and additional rights");
+MODULE_AUTHOR("Mathieu Desnoyers");
+MODULE_DESCRIPTION("LTTng Ring Buffer Client Overwrite Mode");
#define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_OVERWRITE
#define RING_BUFFER_MODE_TEMPLATE_STRING "overwrite"
+#define RING_BUFFER_OUTPUT_TEMPLATE RING_BUFFER_SPLICE
#include "ltt-ring-buffer-client.h"
MODULE_LICENSE("GPL and additional rights");
.sync = RING_BUFFER_SYNC_PER_CPU,
.mode = RING_BUFFER_MODE_TEMPLATE,
.backend = RING_BUFFER_PAGE,
- .output = RING_BUFFER_SPLICE,
+ .output = RING_BUFFER_OUTPUT_TEMPLATE,
.oops = RING_BUFFER_OOPS_CONSISTENCY,
.ipi = RING_BUFFER_IPI_BARRIER,
.wakeup = RING_BUFFER_WAKEUP_BY_TIMER,
#define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD
#define RING_BUFFER_MODE_TEMPLATE_STRING "metadata"
+#define RING_BUFFER_OUTPUT_TEMPLATE RING_BUFFER_SPLICE
#include "ltt-ring-buffer-metadata-client.h"
MODULE_LICENSE("GPL and additional rights");
.sync = RING_BUFFER_SYNC_GLOBAL,
.mode = RING_BUFFER_MODE_TEMPLATE,
.backend = RING_BUFFER_PAGE,
- .output = RING_BUFFER_SPLICE,
+ .output = RING_BUFFER_OUTPUT_TEMPLATE,
.oops = RING_BUFFER_OOPS_CONSISTENCY,
.ipi = RING_BUFFER_IPI_BARRIER,
.wakeup = RING_BUFFER_WAKEUP_BY_TIMER,
--- /dev/null
+/*
+ * ltt-ring-buffer-metadata-client.c
+ *
+ * Copyright (C) 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * LTTng lib ring buffer metadta client.
+ *
+ * Dual LGPL v2.1/GPL v2 license.
+ */
+
+#include <linux/module.h>
+#include "ltt-tracer.h"
+
+#define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD
+#define RING_BUFFER_MODE_TEMPLATE_STRING "metadata-mmap"
+#define RING_BUFFER_OUTPUT_TEMPLATE RING_BUFFER_MMAP
+#include "ltt-ring-buffer-metadata-client.h"
+
+MODULE_LICENSE("GPL and additional rights");
+MODULE_AUTHOR("Mathieu Desnoyers");
+MODULE_DESCRIPTION("LTTng Ring Buffer Metadata Client");