Tracepoint API namespacing ctf_float
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 21 Apr 2021 19:50:19 +0000 (15:50 -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: Ia34bb89dff2542b8d67f2221353ea2e01ed0e0e8
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
doc/examples/demo/ust_tests_demo2.h
doc/examples/hello-static-lib/ust_tests_hello.h
include/lttng/tracepoint.h
include/lttng/ust-tracepoint-event-nowrite.h
include/lttng/ust-tracepoint-event-reset.h
include/lttng/ust-tracepoint-event-write.h
include/lttng/ust-tracepoint-event.h
tests/compile/hello.cxx/ust_tests_hello.h
tests/compile/hello/ust_tests_hello.h
tests/compile/test-app-ctx/ust_tests_hello.h

index 7bd3c9b6b72c9a94a19b65ac5eed728b98a7ad08..b3ab8febaf5ae34c2913e6d2e95b9dc15655308b 100644 (file)
@@ -30,8 +30,8 @@ LTTNG_UST_TRACEPOINT_EVENT(ust_tests_demo2, loop,
                ctf_sequence_text(char, seqfield2, text,
                             size_t, textlen)
                ctf_string(stringfield, text)
-               ctf_float(float, floatfield, floatarg)
-               ctf_float(double, doublefield, doublearg)
+               lttng_ust_field_float(float, floatfield, floatarg)
+               lttng_ust_field_float(double, doublefield, doublearg)
        )
 )
 LTTNG_UST_TRACEPOINT_LOGLEVEL(ust_tests_demo2, loop, LTTNG_UST_TRACEPOINT_LOGLEVEL_WARNING)
index 552e8d218e1910f6b979011d42d757d1bf845f61..a2d4eab49d08a4fa73eb5fdcd85cc4e20160de3c 100644 (file)
@@ -30,8 +30,8 @@ LTTNG_UST_TRACEPOINT_EVENT(ust_tests_hello, tptest,
                ctf_sequence_text(char, seqfield2, text,
                             size_t, textlen)
                ctf_string(stringfield, text)
-               ctf_float(float, floatfield, floatarg)
-               ctf_float(double, doublefield, doublearg)
+               lttng_ust_field_float(float, floatfield, floatarg)
+               lttng_ust_field_float(double, doublefield, doublearg)
        )
 )
 
index b10c42524eaf3aa7f22bed1d90cb78d75dc91e5c..3524c9d11c77ee7b1f6ea25275139c0b2a6ddb03 100644 (file)
@@ -593,6 +593,9 @@ lttng_ust__tracepoints__ptrs_destroy(void)
 #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
 #endif /* #if LTTNG_UST_COMPAT_API(0) */
 
 #ifdef __cplusplus
index 098f792ae03d4b069098390d726dbb5c368ac4df..9358d8f115a3d838746e60f7fa146cb6d554ac52 100644 (file)
@@ -8,9 +8,9 @@
 #define lttng_ust_field_integer_nowrite(_type, _item, _src)                    \
        lttng_ust__field_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 10, 1)
 
-#undef ctf_float_nowrite
-#define ctf_float_nowrite(_type, _item, _src)                  \
-       _ctf_float(_type, _item, _src, 1)
+#undef lttng_ust_field_float_nowrite
+#define lttng_ust_field_float_nowrite(_type, _item, _src)                      \
+       lttng_ust__field_float(_type, _item, _src, 1)
 
 #undef ctf_array_nowrite
 #define ctf_array_nowrite(_type, _item, _src, _length)         \
index fbac2944141c5c09c18e9b7174bedc8cd9b2c761..969459265f0b4a880293aaca3ac31e307d3d82d1 100644 (file)
@@ -31,8 +31,8 @@
 #define lttng_ust__field_integer_ext(_type, _item, _src, _byte_order, _base, \
                        _nowrite)
 
-#undef _ctf_float
-#define _ctf_float(_type, _item, _src, _nowrite)
+#undef lttng_ust__field_float
+#define lttng_ust__field_float(_type, _item, _src, _nowrite)
 
 #undef _ctf_array_encoded
 #define _ctf_array_encoded(_type, _item, _src, _byte_order, _length, _encoding, \
@@ -64,8 +64,8 @@
 #undef lttng_ust_field_integer_network_hex
 #define lttng_ust_field_integer_network_hex(_type, _item, _src)
 
-#undef ctf_float
-#define ctf_float(_type, _item, _src)
+#undef lttng_ust_field_float
+#define lttng_ust_field_float(_type, _item, _src)
 
 #undef ctf_array
 #define ctf_array(_type, _item, _src, _length)
 #undef lttng_ust_field_integer_nowrite
 #define lttng_ust_field_integer_nowrite(_type, _item, _src)
 
-#undef ctf_float_nowrite
-#define ctf_float_nowrite(_type, _item, _src)
+#undef lttng_ust_field_float_nowrite
+#define lttng_ust_field_float_nowrite(_type, _item, _src)
 
 #undef ctf_array_nowrite
 #define ctf_array_nowrite(_type, _item, _src, _length)
index f45cd776b815ed89b13b1fa422ee361d9b6f30e8..66a7dede999dec0374f04d87bc7448c6e81d70ce 100644 (file)
@@ -20,9 +20,9 @@
 #define lttng_ust_field_integer_network_hex(_type, _item, _src)                \
        lttng_ust__field_integer_ext(_type, _item, _src, LTTNG_UST_BIG_ENDIAN, 16, 0)
 
-#undef ctf_float
-#define ctf_float(_type, _item, _src)                          \
-       _ctf_float(_type, _item, _src, 0)
+#undef lttng_ust_field_float
+#define lttng_ust_field_float(_type, _item, _src)                              \
+       lttng_ust__field_float(_type, _item, _src, 0)
 
 #undef ctf_array
 #define ctf_array(_type, _item, _src, _length)                 \
index df3aebf6e0aa19b3ed17dbcfba981b8820512e86..66c27e05393d2d4cf5fe3bc51a4546a22888212f 100644 (file)
@@ -268,8 +268,8 @@ void lttng_ust__event_template_proto___##_provider##___##_name(LTTNG_UST__TP_ARG
                .nofilter = 0,                                  \
        }),
 
-#undef _ctf_float
-#define _ctf_float(_type, _item, _src, _nowrite)               \
+#undef lttng_ust__field_float
+#define lttng_ust__field_float(_type, _item, _src, _nowrite)           \
        LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \
                .struct_size = sizeof(struct lttng_ust_event_field), \
                .name = #_item,                                 \
@@ -419,8 +419,8 @@ static void lttng_ust__event_probe__##_provider##___##_name(LTTNG_UST__TP_ARGS_D
        __event_len += lttng_ust_ring_buffer_align(__event_len, lttng_ust_rb_alignof(_type)); \
        __event_len += sizeof(_type);
 
-#undef _ctf_float
-#define _ctf_float(_type, _item, _src, _nowrite)                                \
+#undef lttng_ust__field_float
+#define lttng_ust__field_float(_type, _item, _src, _nowrite)                            \
        if (0)                                                                   \
                (void) (_src);  /* Unused */                                     \
        __event_len += lttng_ust_ring_buffer_align(__event_len, lttng_ust_rb_alignof(_type)); \
@@ -579,8 +579,8 @@ size_t lttng_ust__event_get_size__##_provider##___##_name(                        \
        }                                                                      \
        __stack_data += sizeof(int64_t);
 
-#undef _ctf_float
-#define _ctf_float(_type, _item, _src, _nowrite)                              \
+#undef lttng_ust__field_float
+#define lttng_ust__field_float(_type, _item, _src, _nowrite)                          \
        {                                                                      \
                double __ctf_tmp_double = (double) (_type) (_src);             \
                memcpy(__stack_data, &__ctf_tmp_double, sizeof(double));       \
@@ -667,8 +667,8 @@ void lttng_ust__event_prepare_interpreter_stack__##_provider##___##_name(char *_
                (void) (_src);  /* Unused */                                   \
        lttng_ust__event_align = lttng_ust__tp_max_t(size_t, lttng_ust__event_align, lttng_ust_rb_alignof(_type));
 
-#undef _ctf_float
-#define _ctf_float(_type, _item, _src, _nowrite)                              \
+#undef lttng_ust__field_float
+#define lttng_ust__field_float(_type, _item, _src, _nowrite)                          \
        if (0)                                                                 \
                (void) (_src);  /* Unused */                                   \
        lttng_ust__event_align = lttng_ust__tp_max_t(size_t, lttng_ust__event_align, lttng_ust_rb_alignof(_type));
@@ -744,8 +744,8 @@ size_t lttng_ust__event_get_align__##_provider##___##_name(LTTNG_UST__TP_ARGS_PR
                __chan->ops->event_write(&__ctx, &__tmp, sizeof(__tmp), lttng_ust_rb_alignof(__tmp));\
        }
 
-#undef _ctf_float
-#define _ctf_float(_type, _item, _src, _nowrite)                       \
+#undef lttng_ust__field_float
+#define lttng_ust__field_float(_type, _item, _src, _nowrite)                   \
        {                                                               \
                _type __tmp = (_src);                                   \
                __chan->ops->event_write(&__ctx, &__tmp, sizeof(__tmp), lttng_ust_rb_alignof(__tmp));\
index 699a65903e5c271143b0b16095e3631c90690fa1..9fba556e23fa9d8e64b02c85d89b91c16589977e 100644 (file)
@@ -42,8 +42,8 @@ LTTNG_UST_TRACEPOINT_EVENT(ust_tests_hello, tptest,
                ctf_sequence_text(char, seqfield2, text,
                             size_t, textlen)
                ctf_string(stringfield, text)
-               ctf_float(float, floatfield, floatarg)
-               ctf_float(double, doublefield, doublearg)
+               lttng_ust_field_float(float, floatfield, floatarg)
+               lttng_ust_field_float(double, doublefield, doublearg)
                ctf_enum(ust_tests_hello, my_enum, int, enumfield, enumarg)
        )
 )
index 2ef4ca4ffdcdd2a76a48e6e8afbdeba285e9c452..7cc92a27d14571f528777220c7cc6160ecaf3aba 100644 (file)
@@ -43,8 +43,8 @@ LTTNG_UST_TRACEPOINT_EVENT(ust_tests_hello, tptest,
                ctf_sequence_network(long, seqfield_network_3, values,
                             size_t, 3)
                ctf_string(stringfield, text)
-               ctf_float(float, floatfield, floatarg)
-               ctf_float(double, doublefield, doublearg)
+               lttng_ust_field_float(float, floatfield, floatarg)
+               lttng_ust_field_float(double, doublefield, doublearg)
                lttng_ust_field_integer(bool, boolfield, boolarg)
                lttng_ust_field_integer_nowrite(int, filterfield, anint)
        )
index 8305bce42f12d027b09503608a0295915a7ef0c9..8d2ac30840713989515544fd5044f7bdbfb08982 100644 (file)
@@ -32,8 +32,8 @@ LTTNG_UST_TRACEPOINT_EVENT(ust_tests_hello, tptest,
                ctf_sequence_text(char, seqfield2, text,
                             size_t, textlen)
                ctf_string(stringfield, text)
-               ctf_float(float, floatfield, floatarg)
-               ctf_float(double, doublefield, doublearg)
+               lttng_ust_field_float(float, floatfield, floatarg)
+               lttng_ust_field_float(double, doublefield, doublearg)
                lttng_ust_field_integer(bool, boolfield, boolarg)
                lttng_ust_field_integer_nowrite(int, filterfield, anint)
        )
This page took 0.031513 seconds and 4 git commands to generate.