Build libringbuffer, remove kernel includes
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 27 Jun 2011 16:02:21 +0000 (12:02 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 27 Jun 2011 16:02:21 +0000 (12:02 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
18 files changed:
Makefile.am
configure.ac
libringbuffer/Makefile.am [new file with mode: 0644]
libringbuffer/api.h
libringbuffer/backend.h
libringbuffer/backend_internal.h
libringbuffer/backend_types.h
libringbuffer/frontend.h
libringbuffer/frontend_api.h
libringbuffer/frontend_internal.h
libringbuffer/frontend_types.h
libringbuffer/iterator.h
libringbuffer/ring_buffer_backend.c
libringbuffer/ring_buffer_frontend.c
libringbuffer/ring_buffer_iterator.c
libringbuffer/ring_buffer_vfs.c
libringbuffer/vatomic.h
libringbuffer/vfs.h

index fe0bbaa399292655867d5825cbad5e04555515bf..0950ff543efe2ed7e88de85fef1e57db0b2ea87a 100644 (file)
@@ -5,7 +5,7 @@ ACLOCAL_AMFLAGS = -I config
 # 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
index 6ab6e3c23b93a8870ab75e22710c13059953a1eb..6fdb2790cd73ca8c68e0168521b49b22b3980e3a 100644 (file)
@@ -141,6 +141,7 @@ AC_CONFIG_FILES([
        doc/man/Makefile
        doc/info/Makefile
        include/Makefile
+       libringbuffer/Makefile
        libust/Makefile
        tests/Makefile
        tests/hello/Makefile
diff --git a/libringbuffer/Makefile.am b/libringbuffer/Makefile.am
new file mode 100644 (file)
index 0000000..bc2c7a7
--- /dev/null
@@ -0,0 +1,22 @@
+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
index f8a1145b10fe4fcee1c7bfe9bacd396784af741a..aa23e40121804be84e75cd40bb2e70be5b14e3e6 100644 (file)
  * 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 */
index 47bc1798334188a2c31c2c89e71c12ad81e4b42e..b50bae1a1f0ca4323fe30a9f73a9204317199589 100644 (file)
  * 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 */
 
index d6c1c8239b2ec35af257d9b7376ad45c52a6df89..2c3de67a6f9e826741ae7ef86b5993241b65d6e4 100644 (file)
  * 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 */
 
index 1d301de2e178f8bc992ceb842ff8a4522f359618..99de9f11dd9f48b17441d7e43db00a63d6f43060 100644 (file)
@@ -11,9 +11,6 @@
  * 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 */
index 01af77a281b046a9dfc8d3de2d0eb69daa98c15e..1eb4ae92d6c69cab1f184f572b21c647f5f866ee 100644 (file)
  * 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 */
 
index 391e59377905f846b8003d2fc94fd59508198751..93b28e43e6e42457b0ee72538ab5ec1392322bf4 100644 (file)
@@ -17,8 +17,7 @@
  * 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.
index 3bd5721eb261df7d26199d8ce5c35470a779127f..37e046bc2d40d557cd3830fa46b171c57a0dc4c2 100644 (file)
  * 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 */
 
index fe208b676e0f035f8bd4b9794ca94f79f24ca8dd..f89d803cefacb59542b6e1f095e2ac8c0aa93950 100644 (file)
  * 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
index f2bd50dd592764d6089f23af47ecc325f613f98d..4914929962babccd283a17712cd6c0d6ff969fd9 100644 (file)
@@ -14,8 +14,8 @@
  * 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
index 332a1d23ae46fef3484670d9b4c8c7e6ad252b31..5ff38f0daa42286578ebc74fc018d337458e6341 100644 (file)
@@ -6,20 +6,9 @@
  * 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
index ecc72ab84f7e3143f930e77cac0bc6ad3de16a8e..a3f14f3d9926855b738d7e6e82c8a950844a12dc 100644 (file)
  * 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.
index df8d485ab92af72953049a115b0ac074a038aebb..ff8e582b0e5d9dad0086f13037bd451e896356b8 100644 (file)
  * 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.
index 9786d353cba185b696cddf61f7238bfea22443f7..3aa3acaac1f6beebb14f984c4d7d4eea152a0458 100644 (file)
@@ -8,14 +8,9 @@
  * 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)
 {
index b944dd63472f25e4dbc653ce91955271abede0aa..eea6d049c71d995545054c5775a0b9cda43baf59 100644 (file)
@@ -9,9 +9,6 @@
  * 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).
index 0a09637af2b37c4e036c418745132a7198689c2f..a27f8c50f08a5228d0fdcdaab1448033be77c321 100644 (file)
@@ -14,9 +14,6 @@
  * 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;
This page took 0.032162 seconds and 4 git commands to generate.