From ae4b659d95f8dab9f2aa4b890d6937d7d5375f07 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Tue, 23 Feb 2021 16:57:55 -0500 Subject: [PATCH] Move private headers out of 'lttng/' public header dir The 'include/lttng' directory contains a mix of public and private headers. Move the private header files out of this directory to reduce confusion. Change-Id: I48c3c4c0e724b4a7665777b95bd9a18efdb6a03a Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- include/Makefile.am | 29 ++++++++++++------- include/{lttng/bitfield.h => ust-bitfield.h} | 0 include/{lttng => }/ust-context-provider.h | 0 include/{lttng => }/ust-dlfcn.h | 2 +- include/{lttng => }/ust-dynamic-type.h | 0 include/{lttng => }/ust-tid.h | 0 include/usterr-signal-safe.h | 2 +- liblttng-ust-comm/lttng-ust-comm.c | 2 +- liblttng-ust-dl/lttng-ust-dl.c | 2 +- liblttng-ust-fork/ustfork.c | 2 +- .../jni/common/lttng_ust_context.c | 2 +- liblttng-ust-libc-wrapper/lttng-ust-malloc.c | 2 +- liblttng-ust-libc-wrapper/lttng-ust-pthread.c | 2 +- liblttng-ust/lttng-bytecode.h | 2 +- liblttng-ust/lttng-context-cgroup-ns.c | 2 +- liblttng-ust/lttng-context-ipc-ns.c | 2 +- liblttng-ust/lttng-context-net-ns.c | 2 +- liblttng-ust/lttng-context-provider.c | 2 +- liblttng-ust/lttng-context-time-ns.c | 2 +- liblttng-ust/lttng-context-uts-ns.c | 2 +- liblttng-ust/lttng-context-vtid.c | 2 +- liblttng-ust/lttng-context.c | 2 +- liblttng-ust/lttng-events.c | 4 +-- liblttng-ust/lttng-ring-buffer-client.h | 2 +- .../lttng-ring-buffer-metadata-client.h | 2 +- liblttng-ust/lttng-ust-dynamic-type.c | 2 +- tests/compile/test-app-ctx/hello.c | 2 +- 27 files changed, 42 insertions(+), 33 deletions(-) rename include/{lttng/bitfield.h => ust-bitfield.h} (100%) rename include/{lttng => }/ust-context-provider.h (100%) rename include/{lttng => }/ust-dlfcn.h (96%) rename include/{lttng => }/ust-dynamic-type.h (100%) rename include/{lttng => }/ust-tid.h (100%) diff --git a/include/Makefile.am b/include/Makefile.am index 6af48ae0..4a9e6d39 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,5 +1,9 @@ # SPDX-License-Identifier: LGPL-2.1-only +### ### +### Public API headers ### +### ### + nobase_include_HEADERS = \ lttng/tracepoint.h \ lttng/tracepoint-rcu.h \ @@ -35,6 +39,16 @@ nobase_include_HEADERS = \ lttng/urcu/static/pointer.h \ lttng/urcu/static/urcu-ust.h +# Auto-generated by configure. +nobase_nodist_include_HEADERS = \ + lttng/ust-config.h \ + lttng/ust-version.h + + +### ### +### Global private headers ### +### ### + # note: usterr-signal-safe.h, core.h and share.h need namespace cleanup. noinst_HEADERS = \ @@ -42,16 +56,11 @@ noinst_HEADERS = \ ust_snprintf.h \ ust-comm.h \ ust-fd.h \ - lttng/ust-tid.h \ - lttng/bitfield.h \ - lttng/ust-dlfcn.h \ - lttng/ust-dynamic-type.h \ - lttng/ust-context-provider.h \ + ust-tid.h \ + ust-bitfield.h \ + ust-dlfcn.h \ + ust-dynamic-type.h \ + ust-context-provider.h \ helper.h \ share.h -# Auto-generated by configure. - -nobase_nodist_include_HEADERS = \ - lttng/ust-config.h \ - lttng/ust-version.h diff --git a/include/lttng/bitfield.h b/include/ust-bitfield.h similarity index 100% rename from include/lttng/bitfield.h rename to include/ust-bitfield.h diff --git a/include/lttng/ust-context-provider.h b/include/ust-context-provider.h similarity index 100% rename from include/lttng/ust-context-provider.h rename to include/ust-context-provider.h diff --git a/include/lttng/ust-dlfcn.h b/include/ust-dlfcn.h similarity index 96% rename from include/lttng/ust-dlfcn.h rename to include/ust-dlfcn.h index 2a76fe5b..0681f8f6 100644 --- a/include/lttng/ust-dlfcn.h +++ b/include/ust-dlfcn.h @@ -10,7 +10,7 @@ #define _LTTNG_UST_DLFCN_H #ifdef _DLFCN_H -#error "Please include lttng/ust-dlfcn.h before dlfcn.h." +#error "Please include ust-dlfcn.h before dlfcn.h." #endif /* _DLFCN_H */ #ifdef __GLIBC__ diff --git a/include/lttng/ust-dynamic-type.h b/include/ust-dynamic-type.h similarity index 100% rename from include/lttng/ust-dynamic-type.h rename to include/ust-dynamic-type.h diff --git a/include/lttng/ust-tid.h b/include/ust-tid.h similarity index 100% rename from include/lttng/ust-tid.h rename to include/ust-tid.h diff --git a/include/usterr-signal-safe.h b/include/usterr-signal-safe.h index a2e99daf..478ad1f8 100644 --- a/include/usterr-signal-safe.h +++ b/include/usterr-signal-safe.h @@ -14,7 +14,7 @@ #include #include #include -#include "lttng/ust-tid.h" +#include "ust-tid.h" enum ust_loglevel { UST_LOGLEVEL_UNKNOWN = 0, diff --git a/liblttng-ust-comm/lttng-ust-comm.c b/liblttng-ust-comm/lttng-ust-comm.c index 52011386..8a35d9f7 100644 --- a/liblttng-ust-comm/lttng-ust-comm.c +++ b/liblttng-ust-comm/lttng-ust-comm.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include "../liblttng-ust/compat.h" diff --git a/liblttng-ust-dl/lttng-ust-dl.c b/liblttng-ust-dl/lttng-ust-dl.c index 004a7ae2..2e4c3c01 100644 --- a/liblttng-ust-dl/lttng-ust-dl.c +++ b/liblttng-ust-dl/lttng-ust-dl.c @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include #include diff --git a/liblttng-ust-fork/ustfork.c b/liblttng-ust-fork/ustfork.c index 32fae490..8fb35280 100644 --- a/liblttng-ust-fork/ustfork.c +++ b/liblttng-ust-fork/ustfork.c @@ -5,7 +5,7 @@ * Copyright (C) 2011-2012 Mathieu Desnoyers */ -#include +#include #include #include #include diff --git a/liblttng-ust-java-agent/jni/common/lttng_ust_context.c b/liblttng-ust-java-agent/jni/common/lttng_ust_context.c index eeb37ebe..2a06a1b3 100644 --- a/liblttng-ust-java-agent/jni/common/lttng_ust_context.c +++ b/liblttng-ust-java-agent/jni/common/lttng_ust_context.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include "helper.h" #include "lttng_ust_context.h" diff --git a/liblttng-ust-libc-wrapper/lttng-ust-malloc.c b/liblttng-ust-libc-wrapper/lttng-ust-malloc.c index dbd2d1b0..0ad45445 100644 --- a/liblttng-ust-libc-wrapper/lttng-ust-malloc.c +++ b/liblttng-ust-libc-wrapper/lttng-ust-malloc.c @@ -10,7 +10,7 @@ * circular dependency loop between this malloc wrapper, liburcu and * libc. */ -#include +#include #include #include #include diff --git a/liblttng-ust-libc-wrapper/lttng-ust-pthread.c b/liblttng-ust-libc-wrapper/lttng-ust-pthread.c index 4875bd00..56d0ea3b 100644 --- a/liblttng-ust-libc-wrapper/lttng-ust-pthread.c +++ b/liblttng-ust-libc-wrapper/lttng-ust-pthread.c @@ -9,7 +9,7 @@ * circular dependency loop between this malloc wrapper, liburcu and * libc. */ -#include +#include #include #include diff --git a/liblttng-ust/lttng-bytecode.h b/liblttng-ust/lttng-bytecode.h index 11c7b7dc..bf1f2cac 100644 --- a/liblttng-ust/lttng-bytecode.h +++ b/liblttng-ust/lttng-bytecode.h @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/liblttng-ust/lttng-context-cgroup-ns.c b/liblttng-ust/lttng-context-cgroup-ns.c index fe803449..191fa9a7 100644 --- a/liblttng-ust/lttng-context-cgroup-ns.c +++ b/liblttng-ust/lttng-context-cgroup-ns.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include "lttng-tracer-core.h" #include "ns.h" diff --git a/liblttng-ust/lttng-context-ipc-ns.c b/liblttng-ust/lttng-context-ipc-ns.c index 893daabc..a40ad29d 100644 --- a/liblttng-ust/lttng-context-ipc-ns.c +++ b/liblttng-ust/lttng-context-ipc-ns.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include "lttng-tracer-core.h" #include "ns.h" diff --git a/liblttng-ust/lttng-context-net-ns.c b/liblttng-ust/lttng-context-net-ns.c index d6c807aa..3ae3860f 100644 --- a/liblttng-ust/lttng-context-net-ns.c +++ b/liblttng-ust/lttng-context-net-ns.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include "lttng-tracer-core.h" #include "ns.h" diff --git a/liblttng-ust/lttng-context-provider.c b/liblttng-ust/lttng-context-provider.c index ea7965c8..9af001b5 100644 --- a/liblttng-ust/lttng-context-provider.c +++ b/liblttng-ust/lttng-context-provider.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include "lttng-tracer-core.h" #include "jhash.h" diff --git a/liblttng-ust/lttng-context-time-ns.c b/liblttng-ust/lttng-context-time-ns.c index 352e2fcc..a2365cd2 100644 --- a/liblttng-ust/lttng-context-time-ns.c +++ b/liblttng-ust/lttng-context-time-ns.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include "lttng-tracer-core.h" #include "ns.h" diff --git a/liblttng-ust/lttng-context-uts-ns.c b/liblttng-ust/lttng-context-uts-ns.c index 5705c0d4..b6150681 100644 --- a/liblttng-ust/lttng-context-uts-ns.c +++ b/liblttng-ust/lttng-context-uts-ns.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include "lttng-tracer-core.h" #include "ns.h" diff --git a/liblttng-ust/lttng-context-vtid.c b/liblttng-ust/lttng-context-vtid.c index feb253d0..bdf0b309 100644 --- a/liblttng-ust/lttng-context-vtid.c +++ b/liblttng-ust/lttng-context-vtid.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include "lttng-tracer-core.h" diff --git a/liblttng-ust/lttng-context.c b/liblttng-ust/lttng-context.c index a5d5d035..19f392f1 100644 --- a/liblttng-ust/lttng-context.c +++ b/liblttng-ust/lttng-context.c @@ -9,7 +9,7 @@ #define _LGPL_SOURCE #include #include -#include +#include #include #include #include diff --git a/liblttng-ust/lttng-events.c b/liblttng-ust/lttng-events.c index 6196fc6a..47460102 100644 --- a/liblttng-ust/lttng-events.c +++ b/liblttng-ust/lttng-events.c @@ -37,8 +37,8 @@ #include #include #include -#include -#include +#include +#include #include "error.h" #include "compat.h" #include "lttng-ust-uuid.h" diff --git a/liblttng-ust/lttng-ring-buffer-client.h b/liblttng-ust/lttng-ring-buffer-client.h index 579f650d..42d68f66 100644 --- a/liblttng-ust/lttng-ring-buffer-client.h +++ b/liblttng-ust/lttng-ring-buffer-client.h @@ -9,7 +9,7 @@ #include #include #include -#include "lttng/bitfield.h" +#include "ust-bitfield.h" #include "clock.h" #include "lttng-tracer.h" #include "../libringbuffer/frontend_types.h" diff --git a/liblttng-ust/lttng-ring-buffer-metadata-client.h b/liblttng-ust/lttng-ring-buffer-metadata-client.h index fbb13871..0b0a65fc 100644 --- a/liblttng-ust/lttng-ring-buffer-metadata-client.h +++ b/liblttng-ust/lttng-ring-buffer-metadata-client.h @@ -9,7 +9,7 @@ #include #include #include -#include "lttng/bitfield.h" +#include "ust-bitfield.h" #include "lttng-tracer.h" #include "../libringbuffer/frontend_types.h" diff --git a/liblttng-ust/lttng-ust-dynamic-type.c b/liblttng-ust/lttng-ust-dynamic-type.c index aad0216f..3c1314c4 100644 --- a/liblttng-ust/lttng-ust-dynamic-type.c +++ b/liblttng-ust/lttng-ust-dynamic-type.c @@ -13,7 +13,7 @@ #include #include -#include +#include #define ctf_enum_value(_string, _value) \ { \ diff --git a/tests/compile/test-app-ctx/hello.c b/tests/compile/test-app-ctx/hello.c index 824a0fcd..3d026095 100644 --- a/tests/compile/test-app-ctx/hello.c +++ b/tests/compile/test-app-ctx/hello.c @@ -31,7 +31,7 @@ struct mmsghdr; /* Internal header. */ #include #include -#include +#include static __thread unsigned int test_count; -- 2.34.1