# libust and '.' (that contains the linker script). However, '.'
# must be installed after libust so it can overwrite libust.so with
# the linker script.
-SUBDIRS = snprintf libust include doc
+SUBDIRS = snprintf libringbuffer libust include doc
#temporarily disabled
# . tests libustinstr-malloc libustfork
doc/man/Makefile
doc/info/Makefile
include/Makefile
+ libringbuffer/Makefile
libust/Makefile
tests/Makefile
tests/hello/Makefile
--- /dev/null
+AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CFLAGS = -fno-strict-aliasing
+
+lib_LTLIBRARIES = libringbuffer.la
+
+libringbuffer_la_SOURCES = \
+ ring_buffer_backend.c \
+ ring_buffer_frontend.c \
+ ring_buffer_iterator.c \
+ ring_buffer_vfs.c \
+ ring_buffer_splice.c \
+ ring_buffer_mmap.c \
+ ../libprio_heap/lttng_prio_heap.c
+
+libringbuffer_la_LDFLAGS = -no-undefined -version-info 0:0:0
+
+libringbuffer_la_LIBADD = \
+ -lpthread \
+ -lrt \
+ $(top_builddir)/snprintf/libustsnprintf.la
+
+libringbuffer_la_CFLAGS = -DUST_COMPONENT="libringbuffer" -fno-strict-aliasing
* Dual LGPL v2.1/GPL v2 license.
*/
-#include "../../wrapper/ringbuffer/backend.h"
-#include "../../wrapper/ringbuffer/frontend.h"
-#include "../../wrapper/ringbuffer/vfs.h"
+#include "backend.h"
+#include "frontend.h"
+#include "vfs.h"
/*
* ring_buffer_frontend_api.h contains static inline functions that depend on
* client static inlines. Hence the inclusion of this "api" header only
* within the client.
*/
-#include "../../wrapper/ringbuffer/frontend_api.h"
+#include "frontend_api.h"
#endif /* _LINUX_RING_BUFFER_API_H */
* the reader in flight recorder mode.
*/
-#include <linux/types.h>
-#include <linux/sched.h>
-#include <linux/timer.h>
-#include <linux/wait.h>
-#include <linux/poll.h>
-#include <linux/list.h>
-#include <linux/fs.h>
-#include <linux/mm.h>
-
/* Internal helpers */
-#include "../../wrapper/ringbuffer/backend_internal.h"
-#include "../../wrapper/ringbuffer/frontend_internal.h"
+#include "backend_internal.h"
+#include "frontend_internal.h"
/* Ring buffer backend API */
* Dual LGPL v2.1/GPL v2 license.
*/
-#include "../../wrapper/ringbuffer/config.h"
-#include "../../wrapper//ringbuffer/backend_types.h"
-#include "../../wrapper/ringbuffer/frontend_types.h"
-#include <linux/string.h>
+#include "config.h"
+#include "backend_types.h"
+#include "frontend_types.h"
/* Ring buffer backend API presented to the frontend */
* Dual LGPL v2.1/GPL v2 license.
*/
-#include <linux/cpumask.h>
-#include <linux/types.h>
-
struct lib_ring_buffer_backend_page {
void *virt; /* page virtual address (cached) */
struct page *page; /* pointer to page structure */
* Dual LGPL v2.1/GPL v2 license.
*/
-#include <linux/pipe_fs_i.h>
-#include <linux/rcupdate.h>
-#include <linux/cpumask.h>
-#include <linux/module.h>
-#include <linux/bitops.h>
-#include <linux/splice.h>
-#include <linux/string.h>
-#include <linux/timer.h>
-#include <linux/sched.h>
-#include <linux/cache.h>
-#include <linux/time.h>
-#include <linux/slab.h>
-#include <linux/init.h>
-#include <linux/stat.h>
-#include <linux/cpu.h>
-#include <linux/fs.h>
-
-#include <asm/atomic.h>
-#include <asm/local.h>
-
/* Internal helpers */
-#include "../../wrapper/ringbuffer/frontend_internal.h"
+#include "frontend_internal.h"
/* Buffer creation/removal and setup operations */
* Dual LGPL v2.1/GPL v2 license.
*/
-#include "../../wrapper/ringbuffer/frontend.h"
-#include <linux/errno.h>
+#include "frontend.h"
/**
* lib_ring_buffer_get_cpu - Precedes ring buffer reserve/commit.
* Dual LGPL v2.1/GPL v2 license.
*/
-#include "../../wrapper/ringbuffer/config.h"
-#include "../../wrapper/ringbuffer/backend_types.h"
-#include "../../wrapper/ringbuffer/frontend_types.h"
-#include "../../lib/prio_heap/lttng_prio_heap.h" /* For per-CPU read-side iterator */
+#include "config.h"
+#include "backend_types.h"
+#include "frontend_types.h"
+#include "../lib_prio_heap/lttng_prio_heap.h" /* For per-CPU read-side iterator */
/* Buffer offset macros */
* Dual LGPL v2.1/GPL v2 license.
*/
-#include <linux/kref.h>
-#include "../../wrapper/ringbuffer/config.h"
-#include "../../wrapper/ringbuffer/backend_types.h"
-#include "../../lib/prio_heap/lttng_prio_heap.h" /* For per-CPU read-side iterator */
+#include "config.h"
+#include "backend_types.h"
+#include "../lib_prio_heap/lttng_prio_heap.h" /* For per-CPU read-side iterator */
/*
* A switch is done during tracing or as a final flush after tracing (so it
* Dual LGPL v2.1/GPL v2 license.
*/
-#include "../../wrapper/ringbuffer/backend.h"
-#include "../../wrapper/ringbuffer/frontend.h"
+#include "backend.h"
+#include "frontend.h"
/*
* lib_ring_buffer_get_next_record advances the buffer read position to the next
* Dual LGPL v2.1/GPL v2 license.
*/
-#include <linux/stddef.h>
-#include <linux/module.h>
-#include <linux/string.h>
-#include <linux/bitops.h>
-#include <linux/delay.h>
-#include <linux/errno.h>
-#include <linux/slab.h>
-#include <linux/cpu.h>
-#include <linux/mm.h>
-
-#include "../../wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */
-#include "../../wrapper/ringbuffer/config.h"
-#include "../../wrapper/ringbuffer/backend.h"
-#include "../../wrapper/ringbuffer/frontend.h"
+#include "config.h"
+#include "backend.h"
+#include "frontend.h"
/**
* lib_ring_buffer_backend_allocate - allocate a channel buffer
* Dual LGPL v2.1/GPL v2 license.
*/
-#include <linux/delay.h>
-#include <linux/module.h>
-#include <linux/percpu.h>
-
-#include "../../wrapper/ringbuffer/config.h"
-#include "../../wrapper/ringbuffer/backend.h"
-#include "../../wrapper/ringbuffer/frontend.h"
-#include "../../wrapper/ringbuffer/iterator.h"
-#include "../../wrapper/ringbuffer/nohz.h"
+#include "config.h"
+#include "backend.h"
+#include "frontend.h"
+#include "iterator.h"
+#include "nohz.h"
/*
* Internal structure representing offsets to use at a sub-buffer switch.
* Dual LGPL v2.1/GPL v2 license.
*/
-#include "../../wrapper/ringbuffer/iterator.h"
-#include <linux/jiffies.h>
-#include <linux/delay.h>
-#include <linux/module.h>
+#include "iterator.h"
/*
* Safety factor taking into account internal kernel interrupt latency.
* Dual LGPL v2.1/GPL v2 license.
*/
-#include <linux/module.h>
-#include <linux/fs.h>
-#include <linux/compat.h>
-
-#include "../../wrapper/ringbuffer/backend.h"
-#include "../../wrapper/ringbuffer/frontend.h"
-#include "../../wrapper/ringbuffer/vfs.h"
-#include "../../wrapper/poll.h"
+#include "backend.h"
+#include "frontend.h"
+#include "vfs.h"
static int put_ulong(unsigned long val, unsigned long arg)
{
* Dual LGPL v2.1/GPL v2 license.
*/
-#include <asm/atomic.h>
-#include <asm/local.h>
-
/*
* Same data type (long) accessed differently depending on configuration.
* v field is for non-atomic access (protected by mutual exclusion).
* Dual LGPL v2.1/GPL v2 license.
*/
-#include <linux/fs.h>
-#include <linux/poll.h>
-
/* VFS API */
extern const struct file_operations lib_ring_buffer_file_operations;