From: Mathieu Desnoyers Date: Fri, 23 Apr 2021 17:59:09 +0000 (-0400) Subject: Hide internal tracepoint and providers data symbols X-Git-Tag: v2.13.0-rc1~18 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6ba0c2b259f1f99ed3ce8ee2e58e90bc393b704e;p=lttng-ust.git Hide internal tracepoint and providers data symbols The tracepoint and providers definitions are always defined and used within the same module, so there is no point in exporting those symbols. Signed-off-by: Mathieu Desnoyers Change-Id: I6730e1221cc15e5f3be63402828bb755322ca003 --- diff --git a/src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.c b/src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.c index c50aee9d..026734d5 100644 --- a/src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.c +++ b/src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.c @@ -9,6 +9,9 @@ #include #include +#define LTTNG_UST_TRACEPOINT_HIDDEN_DEFINITION +#define LTTNG_UST_TRACEPOINT_PROVIDER_HIDDEN_DEFINITION + #define LTTNG_UST_TRACEPOINT_DEFINE #define LTTNG_UST_TRACEPOINT_CREATE_PROBES #define LTTNG_UST_TP_IP_PARAM func_addr diff --git a/src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile.c b/src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile.c index 33f721c7..0b49c790 100644 --- a/src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile.c +++ b/src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile.c @@ -9,6 +9,9 @@ #include #include +#define LTTNG_UST_TRACEPOINT_HIDDEN_DEFINITION +#define LTTNG_UST_TRACEPOINT_PROVIDER_HIDDEN_DEFINITION + #define LTTNG_UST_TRACEPOINT_DEFINE #define LTTNG_UST_TRACEPOINT_CREATE_PROBES #define LTTNG_UST_TP_IP_PARAM func_addr diff --git a/src/lib/lttng-ust-dl/lttng-ust-dl.c b/src/lib/lttng-ust-dl/lttng-ust-dl.c index e342fb2d..9b20874a 100644 --- a/src/lib/lttng-ust-dl/lttng-ust-dl.c +++ b/src/lib/lttng-ust-dl/lttng-ust-dl.c @@ -26,6 +26,7 @@ /* Include link.h last else it conflicts with ust-dlfcn. */ #include +#define LTTNG_UST_TRACEPOINT_HIDDEN_DEFINITION #define LTTNG_UST_TRACEPOINT_DEFINE #include "ust_dl.h" diff --git a/src/lib/lttng-ust-dl/ust_dl.c b/src/lib/lttng-ust-dl/ust_dl.c index 3c18a0c6..1b8d44a1 100644 --- a/src/lib/lttng-ust-dl/ust_dl.c +++ b/src/lib/lttng-ust-dl/ust_dl.c @@ -5,6 +5,9 @@ */ #define _LGPL_SOURCE + +#define LTTNG_UST_TRACEPOINT_PROVIDER_HIDDEN_DEFINITION + #define LTTNG_UST_TRACEPOINT_CREATE_PROBES #define LTTNG_UST_TP_IP_PARAM ip #include "ust_dl.h" diff --git a/src/lib/lttng-ust-java-agent/jni/jul/lttng_ust_jul.c b/src/lib/lttng-ust-java-agent/jni/jul/lttng_ust_jul.c index bb9af808..86c8852b 100644 --- a/src/lib/lttng-ust-java-agent/jni/jul/lttng_ust_jul.c +++ b/src/lib/lttng-ust-java-agent/jni/jul/lttng_ust_jul.c @@ -9,6 +9,9 @@ #define _LGPL_SOURCE #include "org_lttng_ust_agent_jul_LttngJulApi.h" +#define LTTNG_UST_TRACEPOINT_HIDDEN_DEFINITION +#define LTTNG_UST_TRACEPOINT_PROVIDER_HIDDEN_DEFINITION + #define LTTNG_UST_TRACEPOINT_DEFINE #define LTTNG_UST_TRACEPOINT_CREATE_PROBES #include "lttng_ust_jul.h" diff --git a/src/lib/lttng-ust-java-agent/jni/log4j/lttng_ust_log4j.c b/src/lib/lttng-ust-java-agent/jni/log4j/lttng_ust_log4j.c index 65f519dd..fac82857 100644 --- a/src/lib/lttng-ust-java-agent/jni/log4j/lttng_ust_log4j.c +++ b/src/lib/lttng-ust-java-agent/jni/log4j/lttng_ust_log4j.c @@ -9,6 +9,9 @@ #define _LGPL_SOURCE #include "org_lttng_ust_agent_log4j_LttngLog4jApi.h" +#define LTTNG_UST_TRACEPOINT_HIDDEN_DEFINITION +#define LTTNG_UST_TRACEPOINT_PROVIDER_HIDDEN_DEFINITION + #define LTTNG_UST_TRACEPOINT_DEFINE #define LTTNG_UST_TRACEPOINT_CREATE_PROBES #include "lttng_ust_log4j.h" diff --git a/src/lib/lttng-ust-java/LTTngUst.c b/src/lib/lttng-ust-java/LTTngUst.c index 8e9c9603..334071f9 100644 --- a/src/lib/lttng-ust-java/LTTngUst.c +++ b/src/lib/lttng-ust-java/LTTngUst.c @@ -7,6 +7,9 @@ #define _LGPL_SOURCE #include "org_lttng_ust_LTTngUst.h" +#define LTTNG_UST_TRACEPOINT_HIDDEN_DEFINITION +#define LTTNG_UST_TRACEPOINT_PROVIDER_HIDDEN_DEFINITION + #define LTTNG_UST_TRACEPOINT_DEFINE #define LTTNG_UST_TRACEPOINT_CREATE_PROBES #include "lttng_ust_java.h" diff --git a/src/lib/lttng-ust-libc-wrapper/lttng-ust-malloc.c b/src/lib/lttng-ust-libc-wrapper/lttng-ust-malloc.c index 19c60340..e3513db4 100644 --- a/src/lib/lttng-ust-libc-wrapper/lttng-ust-malloc.c +++ b/src/lib/lttng-ust-libc-wrapper/lttng-ust-malloc.c @@ -30,6 +30,9 @@ #include "common/macros.h" #include "common/align.h" +#define LTTNG_UST_TRACEPOINT_HIDDEN_DEFINITION +#define LTTNG_UST_TRACEPOINT_PROVIDER_HIDDEN_DEFINITION + #define LTTNG_UST_TRACEPOINT_DEFINE #define LTTNG_UST_TRACEPOINT_CREATE_PROBES #define LTTNG_UST_TP_IP_PARAM ip diff --git a/src/lib/lttng-ust-pthread-wrapper/lttng-ust-pthread.c b/src/lib/lttng-ust-pthread-wrapper/lttng-ust-pthread.c index 71d21431..6cf2a6fc 100644 --- a/src/lib/lttng-ust-pthread-wrapper/lttng-ust-pthread.c +++ b/src/lib/lttng-ust-pthread-wrapper/lttng-ust-pthread.c @@ -16,6 +16,9 @@ #include "common/macros.h" #include +#define LTTNG_UST_TRACEPOINT_HIDDEN_DEFINITION +#define LTTNG_UST_TRACEPOINT_PROVIDER_HIDDEN_DEFINITION + #define LTTNG_UST_TRACEPOINT_DEFINE #define LTTNG_UST_TRACEPOINT_CREATE_PROBES #define LTTNG_UST_TP_IP_PARAM ip diff --git a/src/lib/lttng-ust-python-agent/lttng_ust_python.c b/src/lib/lttng-ust-python-agent/lttng_ust_python.c index bf71beae..37c75fe1 100644 --- a/src/lib/lttng-ust-python-agent/lttng_ust_python.c +++ b/src/lib/lttng-ust-python-agent/lttng_ust_python.c @@ -5,6 +5,10 @@ */ #define _LGPL_SOURCE + +#define LTTNG_UST_TRACEPOINT_HIDDEN_DEFINITION +#define LTTNG_UST_TRACEPOINT_PROVIDER_HIDDEN_DEFINITION + #define LTTNG_UST_TRACEPOINT_DEFINE #define LTTNG_UST_TRACEPOINT_CREATE_PROBES #include "lttng_ust_python.h" diff --git a/src/lib/lttng-ust/lttng-ust-statedump.c b/src/lib/lttng-ust/lttng-ust-statedump.c index 6d166cf0..a663487e 100644 --- a/src/lib/lttng-ust/lttng-ust-statedump.c +++ b/src/lib/lttng-ust/lttng-ust-statedump.c @@ -24,6 +24,9 @@ #include "common/getenv.h" #include "lib/lttng-ust/events.h" +#define LTTNG_UST_TRACEPOINT_HIDDEN_DEFINITION +#define LTTNG_UST_TRACEPOINT_PROVIDER_HIDDEN_DEFINITION + #define LTTNG_UST_TRACEPOINT_DEFINE #include "ust_lib.h" /* Only define. */ diff --git a/src/lib/lttng-ust/tracef.c b/src/lib/lttng-ust/tracef.c index e321ee07..c05c7811 100644 --- a/src/lib/lttng-ust/tracef.c +++ b/src/lib/lttng-ust/tracef.c @@ -8,6 +8,9 @@ #include #include "common/macros.h" +/* The tracepoint definition is public, but the provider definition is hidden. */ +#define LTTNG_UST_TRACEPOINT_PROVIDER_HIDDEN_DEFINITION + #define LTTNG_UST_TRACEPOINT_CREATE_PROBES #define LTTNG_UST_TRACEPOINT_DEFINE #include "lttng-ust-tracef-provider.h" diff --git a/src/lib/lttng-ust/tracelog.c b/src/lib/lttng-ust/tracelog.c index 4a10a641..8147d7a3 100644 --- a/src/lib/lttng-ust/tracelog.c +++ b/src/lib/lttng-ust/tracelog.c @@ -8,6 +8,9 @@ #include #include "common/macros.h" +/* The tracepoint definition is public, but the provider definition is hidden. */ +#define LTTNG_UST_TRACEPOINT_PROVIDER_HIDDEN_DEFINITION + #define LTTNG_UST_TRACEPOINT_CREATE_PROBES #define LTTNG_UST_TRACEPOINT_DEFINE #include "lttng-ust-tracelog-provider.h" diff --git a/src/lib/lttng-ust/ust_lib.c b/src/lib/lttng-ust/ust_lib.c index 12cb3a8a..96256fdd 100644 --- a/src/lib/lttng-ust/ust_lib.c +++ b/src/lib/lttng-ust/ust_lib.c @@ -6,6 +6,7 @@ */ #define _LGPL_SOURCE +#define LTTNG_UST_TRACEPOINT_PROVIDER_HIDDEN_DEFINITION #define LTTNG_UST_TRACEPOINT_CREATE_PROBES #define LTTNG_UST_TP_IP_PARAM ip #include "ust_lib.h"