From: Mathieu Desnoyers Date: Thu, 22 Apr 2021 15:11:36 +0000 (-0400) Subject: Fix: move compat macros for tracepoint probes to ust-tracepoint-event.h X-Git-Tag: v2.13.0-rc1~25 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f3b06377a014332947b20cc4c266369ea85ddcfa;p=lttng-ust.git Fix: move compat macros for tracepoint probes to ust-tracepoint-event.h 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 Change-Id: Ic50c515448d628db33b1a7958853d9cd2034a81d --- diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h index a8532796..5863e845 100644 --- a/include/lttng/tracepoint.h +++ b/include/lttng/tracepoint.h @@ -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 diff --git a/include/lttng/ust-tracepoint-event.h b/include/lttng/ust-tracepoint-event.h index 1f57f98a..801ccda4 100644 --- a/include/lttng/ust-tracepoint-event.h +++ b/include/lttng/ust-tracepoint-event.h @@ -17,6 +17,54 @@ #include #include #include +#include + +#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)"