Fix: move compat macros for tracepoint probes to ust-tracepoint-event.h
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 22 Apr 2021 15:11:36 +0000 (11:11 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 22 Apr 2021 15:17:26 +0000 (11:17 -0400)
Do not pollute the compile units with API=0 defines for applications
instrumented with tracepoint.h but keeping the probe provider in a
separate compile unit.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ic50c515448d628db33b1a7958853d9cd2034a81d

include/lttng/tracepoint.h
include/lttng/ust-tracepoint-event.h

index a8532796a95dc4f016ecee74f093db5cfe26c657..5863e8457d44f0356e83eaf0cbd43d80eb96dd28 100644 (file)
@@ -586,50 +586,6 @@ lttng_ust__tracepoints__ptrs_destroy(void)
 #define do_tracepoint                  lttng_ust_do_tracepoint
 #define tracepoint_enabled             lttng_ust_tracepoint_enabled
 #define TP_ARGS                                LTTNG_UST_TP_ARGS
-#define TP_FIELDS                      LTTNG_UST_TP_FIELDS
-
-#define ctf_integer                    lttng_ust_field_integer
-#define ctf_integer_hex                        lttng_ust_field_integer_hex
-#define ctf_integer_network            lttng_ust_field_integer_network
-#define ctf_integer_network_hex                lttng_ust_field_integer_network_hex
-#define ctf_integer_nowrite            lttng_ust_field_integer_nowrite
-
-#define ctf_float                      lttng_ust_field_float
-#define ctf_float_nowrite              lttng_ust_field_float_nowrite
-
-#define ctf_array                      lttng_ust_field_array
-#define ctf_array_hex                  lttng_ust_field_array_hex
-#define ctf_array_network              lttng_ust_field_array_network
-#define ctf_array_network_hex          lttng_ust_field_array_network_hex
-#define ctf_array_text                 lttng_ust_field_array_text
-#define ctf_array_nowrite              lttng_ust_field_array_nowrite
-#define ctf_array_nowrite_hex          lttng_ust_field_array_nowrite_hex
-#define ctf_array_network_nowrite      lttng_ust_field_array_network_nowrite
-#define ctf_array_network_nowrite_hex  lttng_ust_field_array_network_nowrite_hex
-#define ctf_array_text_nowrite         lttng_ust_field_array_text_nowrite
-
-#define ctf_sequence                   lttng_ust_field_sequence
-#define ctf_sequence_hex               lttng_ust_field_sequence_hex
-#define ctf_sequence_network           lttng_ust_field_sequence_network
-#define ctf_sequence_network_hex       lttng_ust_field_sequence_network_hex
-#define ctf_sequence_text              lttng_ust_field_sequence_text
-#define ctf_sequence_nowrite           lttng_ust_field_sequence_nowrite
-#define ctf_sequence_nowrite_hex       lttng_ust_field_sequence_nowrite_hex
-#define ctf_sequence_network_nowrite   lttng_ust_field_sequence_network_nowrite
-#define ctf_sequence_network_nowrite_hex lttng_ust_field_sequence_network_nowrite_hex
-#define ctf_sequence_text_nowrite      lttng_ust_field_sequence_text_nowrite
-
-#define ctf_string                     lttng_ust_field_string
-#define ctf_string_nowrite             lttng_ust_field_string_nowrite
-
-#define ctf_unused                     lttng_ust_field_unused
-#define ctf_unused_nowrite             lttng_ust_field_unused_nowrite
-
-#define ctf_enum                       lttng_ust_field_enum
-#define ctf_enum_nowrite               lttng_ust_field_enum_nowrite
-#define ctf_enum_value                 lttng_ust_field_enum_value
-#define ctf_enum_range                 lttng_ust_field_enum_range
-#define ctf_enum_auto                  lttng_ust_field_enum_auto
 #endif /* #if LTTNG_UST_COMPAT_API(0) */
 
 #ifdef __cplusplus
index 1f57f98a0afbfe65766d73a399b81217afc8bb1f..801ccda40a5ca354fffdfa8ef0e8a1e9d8bcb311 100644 (file)
 #include <lttng/ust-endian.h>
 #include <lttng/ust-api-compat.h>
 #include <string.h>
+#include <lttng/ust-api-compat.h>
+
+#if LTTNG_UST_COMPAT_API(0)
+#define TP_FIELDS                      LTTNG_UST_TP_FIELDS
+
+#define ctf_integer                    lttng_ust_field_integer
+#define ctf_integer_hex                        lttng_ust_field_integer_hex
+#define ctf_integer_network            lttng_ust_field_integer_network
+#define ctf_integer_network_hex                lttng_ust_field_integer_network_hex
+#define ctf_integer_nowrite            lttng_ust_field_integer_nowrite
+
+#define ctf_float                      lttng_ust_field_float
+#define ctf_float_nowrite              lttng_ust_field_float_nowrite
+
+#define ctf_array                      lttng_ust_field_array
+#define ctf_array_hex                  lttng_ust_field_array_hex
+#define ctf_array_network              lttng_ust_field_array_network
+#define ctf_array_network_hex          lttng_ust_field_array_network_hex
+#define ctf_array_text                 lttng_ust_field_array_text
+#define ctf_array_nowrite              lttng_ust_field_array_nowrite
+#define ctf_array_nowrite_hex          lttng_ust_field_array_nowrite_hex
+#define ctf_array_network_nowrite      lttng_ust_field_array_network_nowrite
+#define ctf_array_network_nowrite_hex  lttng_ust_field_array_network_nowrite_hex
+#define ctf_array_text_nowrite         lttng_ust_field_array_text_nowrite
+
+#define ctf_sequence                   lttng_ust_field_sequence
+#define ctf_sequence_hex               lttng_ust_field_sequence_hex
+#define ctf_sequence_network           lttng_ust_field_sequence_network
+#define ctf_sequence_network_hex       lttng_ust_field_sequence_network_hex
+#define ctf_sequence_text              lttng_ust_field_sequence_text
+#define ctf_sequence_nowrite           lttng_ust_field_sequence_nowrite
+#define ctf_sequence_nowrite_hex       lttng_ust_field_sequence_nowrite_hex
+#define ctf_sequence_network_nowrite   lttng_ust_field_sequence_network_nowrite
+#define ctf_sequence_network_nowrite_hex lttng_ust_field_sequence_network_nowrite_hex
+#define ctf_sequence_text_nowrite      lttng_ust_field_sequence_text_nowrite
+
+#define ctf_string                     lttng_ust_field_string
+#define ctf_string_nowrite             lttng_ust_field_string_nowrite
+
+#define ctf_unused                     lttng_ust_field_unused
+#define ctf_unused_nowrite             lttng_ust_field_unused_nowrite
+
+#define ctf_enum                       lttng_ust_field_enum
+#define ctf_enum_nowrite               lttng_ust_field_enum_nowrite
+#define ctf_enum_value                 lttng_ust_field_enum_value
+#define ctf_enum_range                 lttng_ust_field_enum_range
+#define ctf_enum_auto                  lttng_ust_field_enum_auto
+#endif /* #if LTTNG_UST_COMPAT_API(0) */
 
 #define LTTNG_UST__NULL_STRING "(null)"
 
This page took 0.027713 seconds and 4 git commands to generate.