From c8fea79c745d42ea8143b7020ae11b4fc2da0d8a Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Thu, 15 Oct 2015 16:47:34 -0400 Subject: [PATCH] Move libconsumer under common/consumer/ MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- configure.ac | 1 + src/bin/lttng-consumerd/Makefile.am | 2 +- src/bin/lttng-consumerd/health-consumerd.c | 4 ++-- src/bin/lttng-consumerd/lttng-consumerd.c | 4 ++-- src/bin/lttng-relayd/health-relayd.c | 4 ++-- src/bin/lttng-sessiond/consumer.h | 2 +- src/bin/lttng-sessiond/ust-consumer.c | 2 +- src/common/Makefile.am | 24 +++---------------- src/common/consumer/Makefile.am | 22 +++++++++++++++++ .../{ => consumer}/consumer-metadata-cache.c | 2 +- .../{ => consumer}/consumer-metadata-cache.h | 2 +- src/common/{ => consumer}/consumer-stream.c | 0 src/common/{ => consumer}/consumer-stream.h | 0 .../{ => consumer}/consumer-testpoint.h | 0 src/common/{ => consumer}/consumer-timer.c | 9 ++++--- src/common/{ => consumer}/consumer-timer.h | 0 src/common/{ => consumer}/consumer.c | 11 ++++----- src/common/{ => consumer}/consumer.h | 0 src/common/kernel-consumer/kernel-consumer.c | 4 ++-- src/common/kernel-consumer/kernel-consumer.h | 2 +- src/common/ust-consumer/ust-consumer.c | 6 ++--- src/common/ust-consumer/ust-consumer.h | 2 +- 22 files changed, 53 insertions(+), 50 deletions(-) create mode 100644 src/common/consumer/Makefile.am rename src/common/{ => consumer}/consumer-metadata-cache.c (99%) rename src/common/{ => consumer}/consumer-metadata-cache.h (97%) rename src/common/{ => consumer}/consumer-stream.c (100%) rename src/common/{ => consumer}/consumer-stream.h (100%) rename src/common/{ => consumer}/consumer-testpoint.h (100%) rename src/common/{ => consumer}/consumer-timer.c (98%) rename src/common/{ => consumer}/consumer-timer.h (100%) rename src/common/{ => consumer}/consumer.c (99%) rename src/common/{ => consumer}/consumer.h (100%) diff --git a/configure.ac b/configure.ac index eabcff2ae..ceaf37715 100644 --- a/configure.ac +++ b/configure.ac @@ -604,6 +604,7 @@ AC_CONFIG_FILES([ src/common/Makefile src/common/kernel-ctl/Makefile src/common/kernel-consumer/Makefile + src/common/consumer/Makefile src/common/ust-consumer/Makefile src/common/hashtable/Makefile src/common/sessiond-comm/Makefile diff --git a/src/bin/lttng-consumerd/Makefile.am b/src/bin/lttng-consumerd/Makefile.am index 28034ca34..7c6b0275e 100644 --- a/src/bin/lttng-consumerd/Makefile.am +++ b/src/bin/lttng-consumerd/Makefile.am @@ -8,7 +8,7 @@ lttng_consumerd_SOURCES = lttng-consumerd.c \ health-consumerd.c lttng_consumerd_LDADD = \ - $(top_builddir)/src/common/libconsumer.la \ + $(top_builddir)/src/common/consumer/libconsumer.la \ $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \ $(top_builddir)/src/common/libcommon.la \ $(top_builddir)/src/common/index/libindex.la \ diff --git a/src/bin/lttng-consumerd/health-consumerd.c b/src/bin/lttng-consumerd/health-consumerd.c index 8d632ef95..2ea6303f7 100644 --- a/src/bin/lttng-consumerd/health-consumerd.c +++ b/src/bin/lttng-consumerd/health-consumerd.c @@ -42,8 +42,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/bin/lttng-consumerd/lttng-consumerd.c b/src/bin/lttng-consumerd/lttng-consumerd.c index cd0fc73b2..87ffb05dd 100644 --- a/src/bin/lttng-consumerd/lttng-consumerd.c +++ b/src/bin/lttng-consumerd/lttng-consumerd.c @@ -42,8 +42,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/bin/lttng-relayd/health-relayd.c b/src/bin/lttng-relayd/health-relayd.c index 8452c1a6c..c6dd2e852 100644 --- a/src/bin/lttng-relayd/health-relayd.c +++ b/src/bin/lttng-relayd/health-relayd.c @@ -42,8 +42,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/bin/lttng-sessiond/consumer.h b/src/bin/lttng-sessiond/consumer.h index 73f113d0a..47e59c7c2 100644 --- a/src/bin/lttng-sessiond/consumer.h +++ b/src/bin/lttng-sessiond/consumer.h @@ -18,7 +18,7 @@ #ifndef _CONSUMER_H #define _CONSUMER_H -#include +#include #include #include #include diff --git a/src/bin/lttng-sessiond/ust-consumer.c b/src/bin/lttng-sessiond/ust-consumer.c index abb9e103d..3bb54f039 100644 --- a/src/bin/lttng-sessiond/ust-consumer.c +++ b/src/bin/lttng-sessiond/ust-consumer.c @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include "consumer.h" diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 5b716129c..0b16e4be9 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -3,14 +3,14 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src AUTOMAKE_OPTIONS = subdir-objects SUBDIRS = compat health hashtable kernel-ctl sessiond-comm relayd \ - kernel-consumer ust-consumer testpoint index config + kernel-consumer ust-consumer testpoint index config \ + consumer AM_CFLAGS = -fno-strict-aliasing noinst_HEADERS = lttng-kernel.h defaults.h macros.h error.h futex.h \ uri.h utils.h lttng-kernel-old.h \ - consumer-metadata-cache.h consumer-timer.h \ - consumer-testpoint.h align.h bitfield.h bug.h + align.h bitfield.h bug.h # Common library noinst_LTLIBRARIES = libcommon.la @@ -28,24 +28,6 @@ libcommon_la_LIBADD = \ -lrt \ $(top_builddir)/src/common/config/libconfig.la -# Consumer library -noinst_LTLIBRARIES += libconsumer.la - -libconsumer_la_SOURCES = consumer.c consumer.h consumer-metadata-cache.c \ - consumer-timer.c consumer-stream.c consumer-stream.h - -libconsumer_la_LIBADD = \ - $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \ - $(top_builddir)/src/common/kernel-consumer/libkernel-consumer.la \ - $(top_builddir)/src/common/hashtable/libhashtable.la \ - $(top_builddir)/src/common/compat/libcompat.la \ - $(top_builddir)/src/common/relayd/librelayd.la - -if HAVE_LIBLTTNG_UST_CTL -libconsumer_la_LIBADD += \ - $(top_builddir)/src/common/ust-consumer/libust-consumer.la -endif - all-local: @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ for script in $(EXTRA_DIST); do \ diff --git a/src/common/consumer/Makefile.am b/src/common/consumer/Makefile.am new file mode 100644 index 000000000..029fb1d68 --- /dev/null +++ b/src/common/consumer/Makefile.am @@ -0,0 +1,22 @@ +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src + +# Consumer library +noinst_LTLIBRARIES = libconsumer.la + +noinst_HEADERS = consumer-metadata-cache.h consumer-timer.h \ + consumer-testpoint.h + +libconsumer_la_SOURCES = consumer.c consumer.h consumer-metadata-cache.c \ + consumer-timer.c consumer-stream.c consumer-stream.h + +libconsumer_la_LIBADD = \ + $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \ + $(top_builddir)/src/common/kernel-consumer/libkernel-consumer.la \ + $(top_builddir)/src/common/hashtable/libhashtable.la \ + $(top_builddir)/src/common/compat/libcompat.la \ + $(top_builddir)/src/common/relayd/librelayd.la + +if HAVE_LIBLTTNG_UST_CTL +libconsumer_la_LIBADD += \ + $(top_builddir)/src/common/ust-consumer/libust-consumer.la +endif diff --git a/src/common/consumer-metadata-cache.c b/src/common/consumer/consumer-metadata-cache.c similarity index 99% rename from src/common/consumer-metadata-cache.c rename to src/common/consumer/consumer-metadata-cache.c index cbd3ef394..48257c299 100644 --- a/src/common/consumer-metadata-cache.c +++ b/src/common/consumer/consumer-metadata-cache.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include "consumer-metadata-cache.h" diff --git a/src/common/consumer-metadata-cache.h b/src/common/consumer/consumer-metadata-cache.h similarity index 97% rename from src/common/consumer-metadata-cache.h rename to src/common/consumer/consumer-metadata-cache.h index e7aba4ac9..8ce7f30b1 100644 --- a/src/common/consumer-metadata-cache.h +++ b/src/common/consumer/consumer-metadata-cache.h @@ -19,7 +19,7 @@ #ifndef CONSUMER_METADATA_CACHE_H #define CONSUMER_METADATA_CACHE_H -#include +#include struct consumer_metadata_cache { char *data; diff --git a/src/common/consumer-stream.c b/src/common/consumer/consumer-stream.c similarity index 100% rename from src/common/consumer-stream.c rename to src/common/consumer/consumer-stream.c diff --git a/src/common/consumer-stream.h b/src/common/consumer/consumer-stream.h similarity index 100% rename from src/common/consumer-stream.h rename to src/common/consumer/consumer-stream.h diff --git a/src/common/consumer-testpoint.h b/src/common/consumer/consumer-testpoint.h similarity index 100% rename from src/common/consumer-testpoint.h rename to src/common/consumer/consumer-testpoint.h diff --git a/src/common/consumer-timer.c b/src/common/consumer/consumer-timer.c similarity index 98% rename from src/common/consumer-timer.c rename to src/common/consumer/consumer-timer.c index 5764b1333..3c9b3feb7 100644 --- a/src/common/consumer-timer.c +++ b/src/common/consumer/consumer-timer.c @@ -26,11 +26,10 @@ #include #include #include -#include - -#include "consumer-timer.h" -#include "consumer-testpoint.h" -#include "ust-consumer/ust-consumer.h" +#include +#include +#include +#include static struct timer_signal_data timer_signal = { .tid = 0, diff --git a/src/common/consumer-timer.h b/src/common/consumer/consumer-timer.h similarity index 100% rename from src/common/consumer-timer.h rename to src/common/consumer/consumer-timer.h diff --git a/src/common/consumer.c b/src/common/consumer/consumer.c similarity index 99% rename from src/common/consumer.c rename to src/common/consumer/consumer.c index 9909fc13c..2897fb855 100644 --- a/src/common/consumer.c +++ b/src/common/consumer/consumer.c @@ -42,12 +42,11 @@ #include #include #include -#include - -#include "consumer.h" -#include "consumer-stream.h" -#include "consumer-testpoint.h" -#include "align.h" +#include +#include +#include +#include +#include struct lttng_consumer_global_data consumer_data = { .stream_count = 0, diff --git a/src/common/consumer.h b/src/common/consumer/consumer.h similarity index 100% rename from src/common/consumer.h rename to src/common/consumer/consumer.h diff --git a/src/common/kernel-consumer/kernel-consumer.c b/src/common/kernel-consumer/kernel-consumer.c index 7875e890b..fac1f0b8a 100644 --- a/src/common/kernel-consumer/kernel-consumer.c +++ b/src/common/kernel-consumer/kernel-consumer.c @@ -39,9 +39,9 @@ #include #include #include -#include +#include #include -#include +#include #include "kernel-consumer.h" diff --git a/src/common/kernel-consumer/kernel-consumer.h b/src/common/kernel-consumer/kernel-consumer.h index 1aad2733b..a07f52188 100644 --- a/src/common/kernel-consumer/kernel-consumer.h +++ b/src/common/kernel-consumer/kernel-consumer.h @@ -19,7 +19,7 @@ #ifndef _LTTNG_KCONSUMER_H #define _LTTNG_KCONSUMER_H -#include +#include int lttng_kconsumer_take_snapshot(struct lttng_consumer_stream *stream); int lttng_kconsumer_get_produced_snapshot(struct lttng_consumer_stream *stream, diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index 5bf3e7b5a..44bcfdc37 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -38,9 +38,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/src/common/ust-consumer/ust-consumer.h b/src/common/ust-consumer/ust-consumer.h index 339c52747..01a50773c 100644 --- a/src/common/ust-consumer/ust-consumer.h +++ b/src/common/ust-consumer/ust-consumer.h @@ -21,7 +21,7 @@ #include -#include +#include #ifdef HAVE_LIBLTTNG_UST_CTL -- 2.34.1