From 9e620ea7b016fc3fd4e08b5d094ffa40b36b50f6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 19 Jun 2020 18:43:47 -0400 Subject: [PATCH] common: move lttng_payload[_view] to libcommon MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The payload utils are moved from libsessiond-comm to libcommon since they present a circular dependancy: a payload uses the dynamic buffer utilities while the actions, triggers, and conditions make use of the lttng_payload utilities. Signed-off-by: Jérémie Galarneau Change-Id: Ib448bde0e442e7660bb7a61cd629f29442715b21 --- include/lttng/action/action-internal.h | 4 ++-- include/lttng/condition/condition-internal.h | 4 ++-- src/bin/lttng-sessiond/client.c | 4 ++-- src/bin/lttng-sessiond/cmd.c | 5 ++--- src/bin/lttng-sessiond/lttng-sessiond.h | 2 +- src/common/Makefile.am | 2 ++ src/common/actions/group.c | 4 ++-- src/common/actions/snapshot-session.c | 4 ++-- src/common/notification.c | 4 ++-- src/common/{sessiond-comm => }/payload-view.c | 0 src/common/{sessiond-comm => }/payload-view.h | 0 src/common/{sessiond-comm => }/payload.c | 0 src/common/{sessiond-comm => }/payload.h | 0 src/common/sessiond-comm/Makefile.am | 3 +-- src/common/snapshot.c | 4 ++-- src/common/trigger.c | 4 ++-- src/common/userspace-probe.c | 2 ++ src/lib/lttng-ctl/lttng-ctl.c | 4 ++-- tests/unit/test_payload.c | 4 ++-- 19 files changed, 28 insertions(+), 26 deletions(-) rename src/common/{sessiond-comm => }/payload-view.c (100%) rename src/common/{sessiond-comm => }/payload-view.h (100%) rename src/common/{sessiond-comm => }/payload.c (100%) rename src/common/{sessiond-comm => }/payload.h (100%) diff --git a/include/lttng/action/action-internal.h b/include/lttng/action/action-internal.h index 57035d869..20faea697 100644 --- a/include/lttng/action/action-internal.h +++ b/include/lttng/action/action-internal.h @@ -12,8 +12,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/include/lttng/condition/condition-internal.h b/include/lttng/condition/condition-internal.h index 306272ab8..98a830942 100644 --- a/include/lttng/condition/condition-internal.h +++ b/include/lttng/condition/condition-internal.h @@ -10,8 +10,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/bin/lttng-sessiond/client.c b/src/bin/lttng-sessiond/client.c index 04c04465f..023853850 100644 --- a/src/bin/lttng-sessiond/client.c +++ b/src/bin/lttng-sessiond/client.c @@ -11,8 +11,8 @@ #include "common/compat/socket.h" #include "common/dynamic-buffer.h" #include "common/dynamic-array.h" -#include "common/sessiond-comm/payload.h" -#include "common/sessiond-comm/payload-view.h" +#include "common/payload.h" +#include "common/payload-view.h" #include "common/sessiond-comm/sessiond-comm.h" #include "lttng/lttng-error.h" #include "lttng/tracker.h" diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 200396df6..8b78e627f 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -7,7 +7,6 @@ */ #include "bin/lttng-sessiond/tracker.h" -#include "common/sessiond-comm/payload.h" #include "lttng/lttng-error.h" #include "lttng/tracker.h" #define _LGPL_SOURCE @@ -27,8 +26,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/bin/lttng-sessiond/lttng-sessiond.h b/src/bin/lttng-sessiond/lttng-sessiond.h index 6c83b6a34..edc1bc115 100644 --- a/src/bin/lttng-sessiond/lttng-sessiond.h +++ b/src/bin/lttng-sessiond/lttng-sessiond.h @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 32b28c82f..d071bdfdf 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -55,6 +55,8 @@ libcommon_la_SOURCES = \ mi-lttng.c mi-lttng.h \ notification.c \ optional.h \ + payload.c payload.h \ + payload-view.c payload-view.h \ pipe.c pipe.h \ readwrite.c readwrite.h \ runas.c runas.h \ diff --git a/src/common/actions/group.c b/src/common/actions/group.c index 5931eb38b..1a434616f 100644 --- a/src/common/actions/group.c +++ b/src/common/actions/group.c @@ -7,8 +7,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/common/actions/snapshot-session.c b/src/common/actions/snapshot-session.c index 058179633..667166770 100644 --- a/src/common/actions/snapshot-session.c +++ b/src/common/actions/snapshot-session.c @@ -9,8 +9,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/common/notification.c b/src/common/notification.c index 806c55619..2544d042f 100644 --- a/src/common/notification.c +++ b/src/common/notification.c @@ -10,8 +10,8 @@ #include #include #include -#include -#include +#include +#include #include LTTNG_HIDDEN diff --git a/src/common/sessiond-comm/payload-view.c b/src/common/payload-view.c similarity index 100% rename from src/common/sessiond-comm/payload-view.c rename to src/common/payload-view.c diff --git a/src/common/sessiond-comm/payload-view.h b/src/common/payload-view.h similarity index 100% rename from src/common/sessiond-comm/payload-view.h rename to src/common/payload-view.h diff --git a/src/common/sessiond-comm/payload.c b/src/common/payload.c similarity index 100% rename from src/common/sessiond-comm/payload.c rename to src/common/payload.c diff --git a/src/common/sessiond-comm/payload.h b/src/common/payload.h similarity index 100% rename from src/common/sessiond-comm/payload.h rename to src/common/payload.h diff --git a/src/common/sessiond-comm/Makefile.am b/src/common/sessiond-comm/Makefile.am index 0e7eb4922..d026651a6 100644 --- a/src/common/sessiond-comm/Makefile.am +++ b/src/common/sessiond-comm/Makefile.am @@ -4,5 +4,4 @@ noinst_LTLIBRARIES = libsessiond-comm.la libsessiond_comm_la_SOURCES = sessiond-comm.c sessiond-comm.h \ inet.c inet.h inet6.c inet6.h \ - relayd.h agent.h payload.h \ - payload.c payload-view.h payload-view.c + relayd.h agent.h diff --git a/src/common/snapshot.c b/src/common/snapshot.c index c2efcc02b..b0bebc81d 100644 --- a/src/common/snapshot.c +++ b/src/common/snapshot.c @@ -5,8 +5,8 @@ * */ -#include -#include +#include +#include #include #include #include diff --git a/src/common/trigger.c b/src/common/trigger.c index 57f84d6a6..5ff478a46 100644 --- a/src/common/trigger.c +++ b/src/common/trigger.c @@ -8,8 +8,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/src/common/userspace-probe.c b/src/common/userspace-probe.c index 8c6adaca6..e6c987c23 100644 --- a/src/common/userspace-probe.c +++ b/src/common/userspace-probe.c @@ -9,6 +9,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c index b74c78749..d1b2fdfd9 100644 --- a/src/lib/lttng-ctl/lttng-ctl.c +++ b/src/lib/lttng-ctl/lttng-ctl.c @@ -23,8 +23,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/tests/unit/test_payload.c b/tests/unit/test_payload.c index 50f08cd75..11c57f21d 100644 --- a/tests/unit/test_payload.c +++ b/tests/unit/test_payload.c @@ -5,8 +5,8 @@ * */ -#include -#include +#include +#include #include static const int TEST_COUNT = 5; -- 2.34.1