Tracepoint API namespacing 'TRACEPOINT_CREATE_PROBES'
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 20 Apr 2021 17:59:50 +0000 (13:59 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 22 Apr 2021 15:01:18 +0000 (11:01 -0400)
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.

Change-Id: Ibb5e359d4d594b8c7a51852acde8e80d9f79e131
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
28 files changed:
doc/examples/cmake-multiple-shared-libraries/tracepoint-provider.cpp
doc/examples/demo/tp.c
doc/examples/demo/tp2.c
doc/examples/demo/tp3.c
doc/examples/easy-ust/tp.c
doc/examples/hello-static-lib/tp.c
include/lttng/tracepoint-event.h
src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.c
src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile.c
src/lib/lttng-ust-dl/ust_dl.c
src/lib/lttng-ust-java-agent/jni/jul/lttng_ust_jul.c
src/lib/lttng-ust-java-agent/jni/log4j/lttng_ust_log4j.c
src/lib/lttng-ust-java/LTTngUst.c
src/lib/lttng-ust-libc-wrapper/lttng-ust-malloc.c
src/lib/lttng-ust-pthread-wrapper/lttng-ust-pthread.c
src/lib/lttng-ust-python-agent/lttng_ust_python.c
src/lib/lttng-ust/lttng-ust-statedump.c
src/lib/lttng-ust/tracef.c
src/lib/lttng-ust/tracelog.c
src/lib/lttng-ust/ust_lib.c
tests/benchmark/tp.c
tests/compile/ctf-types/tp.c
tests/compile/hello-many/tp.c
tests/compile/hello.cxx/tp-cpp.cpp
tests/compile/hello/tp.c
tests/compile/same_line_tracepoint/same_line_tracepoint.c
tests/compile/test-app-ctx/tp.c
tools/lttng-gen-tp

index 2f60f97a33b8be69192e142d7c0b1b74f7f49b3f..17972b2f628bca5024a7bc01485b2a42ac79e251 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright (C) 2016 Sebastien Boisvert <sboisvert@gydle.com>
  */
 
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #define LTTNG_UST_TRACEPOINT_DEFINE
 
 #include "tracepoint-provider.h"
index 6a6fa6c01257db9722936b69c1d0a5ef4fa8fa2a..bfd6c17595ce9f665882a8c161341421407e4a4b 100644 (file)
@@ -4,5 +4,5 @@
  * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #include "ust_tests_demo.h"
index d154fd3d6e7fb8c3571d352f0c99b22d6fe20295..91e9cf4e73e23c6e76fb7d1de14a75c5aeadea83 100644 (file)
@@ -4,5 +4,5 @@
  * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #include "ust_tests_demo2.h"
index 9df93c27bfa35431b7d5467ee6aae9a73c1dc6e9..13b079a763aee0f8a31ad17ce94929b38a94c8aa 100644 (file)
@@ -4,5 +4,5 @@
  * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #include "ust_tests_demo3.h"
index d46661315d10cf0eb567efa91d430a3ba49dc27b..f95da91a11684c2fa9b1c86bc412666de3439a3a 100644 (file)
@@ -8,7 +8,7 @@
  * Defining macro creates the code objects of the traceprobes, only do
  * it once per file
  */
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 /*
  * The header containing our LTTNG_UST_TRACEPOINT_EVENTs.
  */
index c7495dd69d295b8cc10c2e3ec787b9979fd1c65f..98669b6e9947d2fa2f59829e3993818309639fd6 100644 (file)
@@ -4,5 +4,5 @@
  * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #include "ust_tests_hello.h"
index f97b67d1eb9dfbbea6f67c33c3e14f766227f372..cf482b178071ad8276adf5bd7a6fd859f21b451d 100644 (file)
@@ -4,7 +4,16 @@
  * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#ifdef TRACEPOINT_CREATE_PROBES
+#include <lttng/ust-api-compat.h>
+
+
+#if LTTNG_UST_COMPAT_API(0)
+# if defined(TRACEPOINT_CREATE_PROBES) && !defined(LTTNG_UST_TRACEPOINT_CREATE_PROBES)
+#  define LTTNG_UST_TRACEPOINT_CREATE_PROBES
+# endif
+#endif /* #if LTTNG_UST_COMPAT_API(0) */
+
+#ifdef LTTNG_UST_TRACEPOINT_CREATE_PROBES
 
 #define __tp_stringify1(x)     #x
 #define __tp_stringify(x)      __tp_stringify1(x)
                        LTTNG_UST__TP_PARAMS(_args))
 
 
+#undef LTTNG_UST_TRACEPOINT_CREATE_PROBES
+#if LTTNG_UST_COMPAT_API(0)
 #undef TRACEPOINT_CREATE_PROBES
+#endif
 
 #define TRACEPOINT_HEADER_MULTI_READ
 
@@ -31,7 +43,7 @@
 #undef TRACEPOINT_HEADER_MULTI_READ
 #undef TRACEPOINT_INCLUDE
 
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 
 /*
  * Put back definitions to the state they were when defined by
@@ -59,4 +71,4 @@
 #undef LTTNG_UST_TRACEPOINT_MODEL_EMF_URI
 #define LTTNG_UST_TRACEPOINT_MODEL_EMF_URI(provider, name, uri)
 
-#endif /* TRACEPOINT_CREATE_PROBES */
+#endif /* LTTNG_UST_TRACEPOINT_CREATE_PROBES */
index 3ea273acb11a2ac51fd7e6ad74279ea14cd93e98..2d91d8acd84961ac3a84e9a3bca550036fd64827 100644 (file)
@@ -10,7 +10,7 @@
 #include <stdio.h>
 
 #define LTTNG_UST_TRACEPOINT_DEFINE
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #define TP_IP_PARAM func_addr
 #include "lttng-ust-cyg-profile-fast.h"
 
index 8566695cd8bccd72698d0b192a1fbddb33207603..e0a0dd61eb250cd00102ad03a6409e1fa824ab52 100644 (file)
@@ -10,7 +10,7 @@
 #include <stdio.h>
 
 #define LTTNG_UST_TRACEPOINT_DEFINE
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #define TP_IP_PARAM func_addr
 #include "lttng-ust-cyg-profile.h"
 
index b35ed620d9dbd00353ab8838d3e1bc450fa8e2c2..234857aefbf449522afe329808339abf23ac40ba 100644 (file)
@@ -5,6 +5,6 @@
  */
 
 #define _LGPL_SOURCE
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #define TP_IP_PARAM ip
 #include "ust_dl.h"
index 840b27de91c7f3a0d594ca3d3cf88d77de2288ce..bb9af808f68d5fe16332b45a5273a932d79b4788 100644 (file)
@@ -10,7 +10,7 @@
 #include "org_lttng_ust_agent_jul_LttngJulApi.h"
 
 #define LTTNG_UST_TRACEPOINT_DEFINE
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #include "lttng_ust_jul.h"
 #include "../common/lttng_ust_context.h"
 
index 6708fb4cebfa54e6de0a2b6b3dcbb0e312229456..65f519dda778718c32595383160dd7d4ea1e7623 100644 (file)
@@ -10,7 +10,7 @@
 #include "org_lttng_ust_agent_log4j_LttngLog4jApi.h"
 
 #define LTTNG_UST_TRACEPOINT_DEFINE
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #include "lttng_ust_log4j.h"
 #include "../common/lttng_ust_context.h"
 
index 69e00f90917ae98775dfe503963d7244354db6a8..8e9c960387f5cf647c35de4716a9a6755173009c 100644 (file)
@@ -8,7 +8,7 @@
 #include "org_lttng_ust_LTTngUst.h"
 
 #define LTTNG_UST_TRACEPOINT_DEFINE
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #include "lttng_ust_java.h"
 
 JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointInt(JNIEnv *env,
index 3243693d84ca65c2ef4180401a420aad47a8a2a4..d51c5ab3ee3631c9a2cdfb0a89427d06b2844e14 100644 (file)
@@ -31,7 +31,7 @@
 #include "common/align.h"
 
 #define LTTNG_UST_TRACEPOINT_DEFINE
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #define TP_IP_PARAM ip
 #include "ust_libc.h"
 
index b590aa3e3082718c5fae10b46b82744303928582..09881e2b35166e9c7c6d118128f2410a521584a9 100644 (file)
@@ -17,7 +17,7 @@
 #include <pthread.h>
 
 #define LTTNG_UST_TRACEPOINT_DEFINE
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #define TP_IP_PARAM ip
 #include "ust_pthread.h"
 
index 44b6ccf91c8d61c14e9eb0a3d2bee2a9a58185b9..bf71beae3a366c0fb4a25f1497d51479020afa91 100644 (file)
@@ -6,7 +6,7 @@
 
 #define _LGPL_SOURCE
 #define LTTNG_UST_TRACEPOINT_DEFINE
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #include "lttng_ust_python.h"
 
 /*
index b0c9a1a8bc0511bd83456a8820eaa1a38de26db8..62a94291edf797df272301c8a389b1afd792025f 100644 (file)
@@ -27,7 +27,7 @@
 #define LTTNG_UST_TRACEPOINT_DEFINE
 #include "ust_lib.h"                           /* Only define. */
 
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #define TP_SESSION_CHECK
 #include "lttng-ust-statedump-provider.h"      /* Define and create probes. */
 
index b3aa32e97911c0138fa7517a195f1615463854b6..e1824e5c767148c4f36d0111e30447613adfdedf 100644 (file)
@@ -8,7 +8,7 @@
 #include <stdio.h>
 #include "common/macros.h"
 
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #define LTTNG_UST_TRACEPOINT_DEFINE
 #include "lttng-ust-tracef-provider.h"
 
index e5bd3890ff5157107772c77ee91e611e752a3792..d079b15a9ca446d58bbf84ba7c60030885ea9a67 100644 (file)
@@ -8,7 +8,7 @@
 #include <stdio.h>
 #include "common/macros.h"
 
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #define LTTNG_UST_TRACEPOINT_DEFINE
 #include "lttng-ust-tracelog-provider.h"
 
index 19817d78c7a54eb4f0c87e5bdb88386bf6ddb283..e56a43f69b6d4a154767580ab6cee5a8a6045a85 100644 (file)
@@ -6,6 +6,6 @@
  */
 
 #define _LGPL_SOURCE
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #define TP_IP_PARAM ip
 #include "ust_lib.h"
index a0bd812c1a6aec7493f10e4dde34f19875f806f9..72339e2f034433ba725ef7e8d53743179ebd472a 100644 (file)
@@ -4,5 +4,5 @@
  * Copyright (C) 2013 Zifei Tong <soariez@gmail.com>
  */
 
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #include "ust_tests_benchmark.h"
index 426854c46fa8bbb397f3d039df6100f330c2977a..25c9c8a7a8562439815d45aecfe4537989ed8d92 100644 (file)
@@ -4,5 +4,5 @@
  * Copyright (C) 2014 Geneviève Bastien <gbastien@versatic.net>
  */
 
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #include "ust_tests_ctf_types.h"
index 6c032644256774338cb0c81bbcb67be776465982..fbd81ab9a296ffaf3bfb34d0532c4760719dc599 100644 (file)
@@ -4,5 +4,5 @@
  * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #include "ust_tests_hello_many.h"
index c7495dd69d295b8cc10c2e3ec787b9979fd1c65f..98669b6e9947d2fa2f59829e3993818309639fd6 100644 (file)
@@ -4,5 +4,5 @@
  * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #include "ust_tests_hello.h"
index c7495dd69d295b8cc10c2e3ec787b9979fd1c65f..98669b6e9947d2fa2f59829e3993818309639fd6 100644 (file)
@@ -4,5 +4,5 @@
  * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #include "ust_tests_hello.h"
index 9ec026073572c23c7180c8530f1ea0c10bd8ede9..81c7540dc8eb418b4e50bb075bd5bd42a6edb4ab 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #define LTTNG_UST_TRACEPOINT_DEFINE
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #include "ust_tests_sameline.h"
 
 int main(void)
index c7495dd69d295b8cc10c2e3ec787b9979fd1c65f..98669b6e9947d2fa2f59829e3993818309639fd6 100644 (file)
@@ -4,5 +4,5 @@
  * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 #include "ust_tests_hello.h"
index c3ee7c5e13d84fbc0655fe136f2741aba8b231e3..889a40306537046e414f676c0b9d28dc2a15bc49 100755 (executable)
@@ -57,7 +57,7 @@ class HeaderFile:
 
 class CFile:
     FILE_TPL = """
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 /*
  * The header containing our LTTNG_UST_TRACEPOINT_EVENTs.
  */
This page took 0.035073 seconds and 4 git commands to generate.