From b4064f282fc27c80f17166b1439442d6ddd118b2 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Wed, 21 Apr 2021 15:37:36 -0400 Subject: [PATCH] Tracepoint API namespacing ctf_integer 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: I361286079a409226287eb0c401231f4d147e08a4 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- doc/examples/demo/ust_tests_demo.h | 4 +-- doc/examples/demo/ust_tests_demo2.h | 10 +++--- doc/examples/demo/ust_tests_demo3.h | 2 +- .../hello-static-lib/ust_tests_hello.h | 10 +++--- include/lttng/tp/lttng-ust-tracelog.h | 2 +- include/lttng/tracepoint.h | 10 ++++-- include/lttng/ust-tracepoint-event-nowrite.h | 6 ++-- include/lttng/ust-tracepoint-event-reset.h | 24 +++++++------- include/lttng/ust-tracepoint-event-write.h | 24 +++++++------- include/lttng/ust-tracepoint-event.h | 30 ++++++++--------- .../lttng-ust-cyg-profile-fast.h | 2 +- .../lttng-ust-cyg-profile.h | 4 +-- src/lib/lttng-ust-dl/ust_dl.h | 30 ++++++++--------- .../jni/jul/lttng_ust_jul.h | 6 ++-- .../jni/log4j/lttng_ust_log4j.h | 6 ++-- src/lib/lttng-ust-java/lttng_ust_java.h | 12 +++---- src/lib/lttng-ust-libc-wrapper/ust_libc.h | 32 +++++++++---------- .../lttng-ust-pthread-wrapper/ust_pthread.h | 14 ++++---- .../lttng-ust-python-agent/lttng_ust_python.h | 6 ++-- .../lttng-ust/lttng-ust-statedump-provider.h | 16 +++++----- src/lib/lttng-ust/ust_lib.h | 16 +++++----- tests/benchmark/ust_tests_benchmark.h | 2 +- tests/compile/ctf-types/ust_tests_ctf_types.h | 4 +-- tests/compile/hello.cxx/ust_tests_hello.h | 10 +++--- tests/compile/hello/ust_tests_hello.h | 14 ++++---- tests/compile/test-app-ctx/ust_tests_hello.h | 14 ++++---- 26 files changed, 158 insertions(+), 152 deletions(-) diff --git a/doc/examples/demo/ust_tests_demo.h b/doc/examples/demo/ust_tests_demo.h index aa4a0863..8758838d 100644 --- a/doc/examples/demo/ust_tests_demo.h +++ b/doc/examples/demo/ust_tests_demo.h @@ -15,7 +15,7 @@ LTTNG_UST_TRACEPOINT_EVENT(ust_tests_demo, starting, LTTNG_UST_TP_ARGS(int, value), LTTNG_UST_TP_FIELDS( - ctf_integer(int, value, value) + lttng_ust_field_integer(int, value, value) ) ) LTTNG_UST_TRACEPOINT_LOGLEVEL(ust_tests_demo, starting, LTTNG_UST_TRACEPOINT_LOGLEVEL_CRIT) @@ -30,7 +30,7 @@ LTTNG_UST_TRACEPOINT_MODEL_EMF_URI(ust_tests_demo, starting, LTTNG_UST_TRACEPOINT_EVENT(ust_tests_demo, done, LTTNG_UST_TP_ARGS(int, value), LTTNG_UST_TP_FIELDS( - ctf_integer(int, value, value) + lttng_ust_field_integer(int, value, value) ) ) LTTNG_UST_TRACEPOINT_LOGLEVEL(ust_tests_demo, done, LTTNG_UST_TRACEPOINT_LOGLEVEL_CRIT) diff --git a/doc/examples/demo/ust_tests_demo2.h b/doc/examples/demo/ust_tests_demo2.h index 5339e513..7bd3c9b6 100644 --- a/doc/examples/demo/ust_tests_demo2.h +++ b/doc/examples/demo/ust_tests_demo2.h @@ -18,11 +18,11 @@ LTTNG_UST_TRACEPOINT_EVENT(ust_tests_demo2, loop, char *, text, size_t, textlen, double, doublearg, float, floatarg), LTTNG_UST_TP_FIELDS( - ctf_integer(int, intfield, anint) - ctf_integer_hex(int, intfield2, anint) - ctf_integer(long, longfield, anint) - ctf_integer_network(int, netintfield, netint) - ctf_integer_network_hex(int, netintfieldhex, netint) + lttng_ust_field_integer(int, intfield, anint) + lttng_ust_field_integer_hex(int, intfield2, anint) + lttng_ust_field_integer(long, longfield, anint) + lttng_ust_field_integer_network(int, netintfield, netint) + lttng_ust_field_integer_network_hex(int, netintfieldhex, netint) ctf_array(long, arrfield1, values, 3) ctf_array_text(char, arrfield2, text, 10) ctf_sequence(char, seqfield1, text, diff --git a/doc/examples/demo/ust_tests_demo3.h b/doc/examples/demo/ust_tests_demo3.h index bc0293a8..8b79c068 100644 --- a/doc/examples/demo/ust_tests_demo3.h +++ b/doc/examples/demo/ust_tests_demo3.h @@ -15,7 +15,7 @@ LTTNG_UST_TRACEPOINT_EVENT(ust_tests_demo3, done, LTTNG_UST_TP_ARGS(int, value), LTTNG_UST_TP_FIELDS( - ctf_integer(int, value, value) + lttng_ust_field_integer(int, value, value) ) ) LTTNG_UST_TRACEPOINT_LOGLEVEL(ust_tests_demo3, done, LTTNG_UST_TRACEPOINT_LOGLEVEL_WARNING) diff --git a/doc/examples/hello-static-lib/ust_tests_hello.h b/doc/examples/hello-static-lib/ust_tests_hello.h index 823b1820..552e8d21 100644 --- a/doc/examples/hello-static-lib/ust_tests_hello.h +++ b/doc/examples/hello-static-lib/ust_tests_hello.h @@ -18,11 +18,11 @@ LTTNG_UST_TRACEPOINT_EVENT(ust_tests_hello, tptest, char *, text, size_t, textlen, double, doublearg, float, floatarg), LTTNG_UST_TP_FIELDS( - ctf_integer(int, intfield, anint) - ctf_integer_hex(int, intfield2, anint) - ctf_integer(long, longfield, anint) - ctf_integer_network(int, netintfield, netint) - ctf_integer_network_hex(int, netintfieldhex, netint) + lttng_ust_field_integer(int, intfield, anint) + lttng_ust_field_integer_hex(int, intfield2, anint) + lttng_ust_field_integer(long, longfield, anint) + lttng_ust_field_integer_network(int, netintfield, netint) + lttng_ust_field_integer_network_hex(int, netintfieldhex, netint) ctf_array(long, arrfield1, values, 3) ctf_array_text(char, arrfield2, text, 10) ctf_sequence(char, seqfield1, text, diff --git a/include/lttng/tp/lttng-ust-tracelog.h b/include/lttng/tp/lttng-ust-tracelog.h index 497b81aa..c8ae0598 100644 --- a/include/lttng/tp/lttng-ust-tracelog.h +++ b/include/lttng/tp/lttng-ust-tracelog.h @@ -11,7 +11,7 @@ LTTNG_UST_TRACEPOINT_EVENT_CLASS(lttng_ust_tracelog, tlclass, LTTNG_UST_TP_ARGS(const char *, file, int, line, const char *, func, const char *, msg, unsigned int, len, void *, ip), LTTNG_UST_TP_FIELDS( - ctf_integer(int, line, line) + lttng_ust_field_integer(int, line, line) ctf_string(file, file) ctf_string(func, func) ctf_sequence_text(char, msg, msg, unsigned int, len) diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h index 42065767..b10c4252 100644 --- a/include/lttng/tracepoint.h +++ b/include/lttng/tracepoint.h @@ -587,6 +587,12 @@ lttng_ust__tracepoints__ptrs_destroy(void) #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 #endif /* #if LTTNG_UST_COMPAT_API(0) */ #ifdef __cplusplus @@ -663,10 +669,10 @@ lttng_ust__tracepoints__ptrs_destroy(void) * * LTTNG_UST_TP_FIELDS( * * Integer, printed in base 10 * - * ctf_integer(int, field_a, arg0) + * lttng_ust_field_integer(int, field_a, arg0) * * * Integer, printed with 0x base 16 * - * ctf_integer_hex(unsigned long, field_d, arg1) + * lttng_ust_field_integer_hex(unsigned long, field_d, arg1) * * * Enumeration * * ctf_enum(someproject_component, enum_name, int, field_e, arg0) diff --git a/include/lttng/ust-tracepoint-event-nowrite.h b/include/lttng/ust-tracepoint-event-nowrite.h index 7ee01e38..098f792a 100644 --- a/include/lttng/ust-tracepoint-event-nowrite.h +++ b/include/lttng/ust-tracepoint-event-nowrite.h @@ -4,9 +4,9 @@ * Copyright (C) 2011 Mathieu Desnoyers */ -#undef ctf_integer_nowrite -#define ctf_integer_nowrite(_type, _item, _src) \ - _ctf_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 10, 1) +#undef lttng_ust_field_integer_nowrite +#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) \ diff --git a/include/lttng/ust-tracepoint-event-reset.h b/include/lttng/ust-tracepoint-event-reset.h index f70b9df8..fbac2944 100644 --- a/include/lttng/ust-tracepoint-event-reset.h +++ b/include/lttng/ust-tracepoint-event-reset.h @@ -27,8 +27,8 @@ #undef LTTNG_UST_TRACEPOINT_MODEL_EMF_URI #define LTTNG_UST_TRACEPOINT_MODEL_EMF_URI(provider, name, uri) -#undef _ctf_integer_ext -#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, \ +#undef lttng_ust__field_integer_ext +#define lttng_ust__field_integer_ext(_type, _item, _src, _byte_order, _base, \ _nowrite) #undef _ctf_float @@ -52,17 +52,17 @@ #define _ctf_enum(_provider, _name, _type, _item, _src, _nowrite) /* "write" */ -#undef ctf_integer -#define ctf_integer(_type, _item, _src) +#undef lttng_ust_field_integer +#define lttng_ust_field_integer(_type, _item, _src) -#undef ctf_integer_hex -#define ctf_integer_hex(_type, _item, _src) +#undef lttng_ust_field_integer_hex +#define lttng_ust_field_integer_hex(_type, _item, _src) -#undef ctf_integer_network -#define ctf_integer_network(_type, _item, _src) +#undef lttng_ust_field_integer_network +#define lttng_ust_field_integer_network(_type, _item, _src) -#undef ctf_integer_network_hex -#define ctf_integer_network_hex(_type, _item, _src) +#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) @@ -107,8 +107,8 @@ #define ctf_enum(_provider, _name, _type, _item, _src) /* "nowrite" */ -#undef ctf_integer_nowrite -#define ctf_integer_nowrite(_type, _item, _src) +#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) diff --git a/include/lttng/ust-tracepoint-event-write.h b/include/lttng/ust-tracepoint-event-write.h index 6e7e6ceb..f45cd776 100644 --- a/include/lttng/ust-tracepoint-event-write.h +++ b/include/lttng/ust-tracepoint-event-write.h @@ -4,21 +4,21 @@ * Copyright (C) 2011 Mathieu Desnoyers */ -#undef ctf_integer -#define ctf_integer(_type, _item, _src) \ - _ctf_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 10, 0) +#undef lttng_ust_field_integer +#define lttng_ust_field_integer(_type, _item, _src) \ + lttng_ust__field_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 10, 0) -#undef ctf_integer_hex -#define ctf_integer_hex(_type, _item, _src) \ - _ctf_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 16, 0) +#undef lttng_ust_field_integer_hex +#define lttng_ust_field_integer_hex(_type, _item, _src) \ + lttng_ust__field_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 16, 0) -#undef ctf_integer_network -#define ctf_integer_network(_type, _item, _src) \ - _ctf_integer_ext(_type, _item, _src, LTTNG_UST_BIG_ENDIAN, 10, 0) +#undef lttng_ust_field_integer_network +#define lttng_ust_field_integer_network(_type, _item, _src) \ + lttng_ust__field_integer_ext(_type, _item, _src, LTTNG_UST_BIG_ENDIAN, 10, 0) -#undef ctf_integer_network_hex -#define ctf_integer_network_hex(_type, _item, _src) \ - _ctf_integer_ext(_type, _item, _src, LTTNG_UST_BIG_ENDIAN, 16, 0) +#undef lttng_ust_field_integer_network_hex +#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) \ diff --git a/include/lttng/ust-tracepoint-event.h b/include/lttng/ust-tracepoint-event.h index 3761915a..df3aebf6 100644 --- a/include/lttng/ust-tracepoint-event.h +++ b/include/lttng/ust-tracepoint-event.h @@ -258,8 +258,8 @@ void lttng_ust__event_template_proto___##_provider##___##_name(LTTNG_UST__TP_ARG #include #include -#undef _ctf_integer_ext -#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite) \ +#undef lttng_ust__field_integer_ext +#define lttng_ust__field_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite) \ LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \ .struct_size = sizeof(struct lttng_ust_event_field), \ .name = #_item, \ @@ -370,7 +370,7 @@ void lttng_ust__event_template_proto___##_provider##___##_name(LTTNG_UST__TP_ARG #define LTTNG_UST__TRACEPOINT_EVENT_CLASS(_provider, _name, _args, _fields) \ static const struct lttng_ust_event_field * const lttng_ust__event_fields___##_provider##___##_name[] = { \ _fields \ - ctf_integer(int, dummy, 0) /* Dummy, C99 forbids 0-len array. */ \ + lttng_ust_field_integer(int, dummy, 0) /* Dummy, C99 forbids 0-len array. */ \ }; #undef LTTNG_UST_TRACEPOINT_ENUM @@ -412,8 +412,8 @@ static void lttng_ust__event_probe__##_provider##___##_name(LTTNG_UST__TP_ARGS_D #include #include -#undef _ctf_integer_ext -#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite) \ +#undef lttng_ust__field_integer_ext +#define lttng_ust__field_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite) \ if (0) \ (void) (_src); /* Unused */ \ __event_len += lttng_ust_ring_buffer_align(__event_len, lttng_ust_rb_alignof(_type)); \ @@ -458,7 +458,7 @@ static void lttng_ust__event_probe__##_provider##___##_name(LTTNG_UST__TP_ARGS_D #undef _ctf_enum #define _ctf_enum(_provider, _name, _type, _item, _src, _nowrite) \ - _ctf_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 10, _nowrite) + lttng_ust__field_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 10, _nowrite) #undef LTTNG_UST_TP_ARGS #define LTTNG_UST_TP_ARGS(...) __VA_ARGS__ @@ -500,8 +500,8 @@ size_t lttng_ust__event_get_size__##_provider##___##_name( \ #include #include -#undef _ctf_integer_ext -#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite) \ +#undef lttng_ust__field_integer_ext +#define lttng_ust__field_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite) \ if (lttng_ust_is_signed_type(_type)) { \ int64_t __ctf_tmp_int64; \ switch (sizeof(_type)) { \ @@ -627,7 +627,7 @@ size_t lttng_ust__event_get_size__##_provider##___##_name( \ #undef _ctf_enum #define _ctf_enum(_provider, _name, _type, _item, _src, _nowrite) \ - _ctf_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 10, _nowrite) + lttng_ust__field_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 10, _nowrite) #undef LTTNG_UST_TP_ARGS #define LTTNG_UST_TP_ARGS(...) __VA_ARGS__ @@ -661,8 +661,8 @@ void lttng_ust__event_prepare_interpreter_stack__##_provider##___##_name(char *_ #include #include -#undef _ctf_integer_ext -#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite) \ +#undef lttng_ust__field_integer_ext +#define lttng_ust__field_integer_ext(_type, _item, _src, _byte_order, _base, _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)); @@ -702,7 +702,7 @@ void lttng_ust__event_prepare_interpreter_stack__##_provider##___##_name(char *_ #undef _ctf_enum #define _ctf_enum(_provider, _name, _type, _item, _src, _nowrite) \ - _ctf_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 10, _nowrite) + lttng_ust__field_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 10, _nowrite) #undef LTTNG_UST_TP_ARGS #define LTTNG_UST_TP_ARGS(...) __VA_ARGS__ @@ -737,8 +737,8 @@ size_t lttng_ust__event_get_align__##_provider##___##_name(LTTNG_UST__TP_ARGS_PR #include #include -#undef _ctf_integer_ext -#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite) \ +#undef lttng_ust__field_integer_ext +#define lttng_ust__field_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite) \ { \ _type __tmp = (_src); \ __chan->ops->event_write(&__ctx, &__tmp, sizeof(__tmp), lttng_ust_rb_alignof(__tmp));\ @@ -786,7 +786,7 @@ size_t lttng_ust__event_get_align__##_provider##___##_name(LTTNG_UST__TP_ARGS_PR #undef _ctf_enum #define _ctf_enum(_provider, _name, _type, _item, _src, _nowrite) \ - _ctf_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 10, _nowrite) + lttng_ust__field_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 10, _nowrite) /* Beware: this get len actually consumes the len value */ #undef lttng_ust__get_dynamic_len diff --git a/src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.h b/src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.h index e5bbba69..41776565 100644 --- a/src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.h +++ b/src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.h @@ -19,7 +19,7 @@ extern "C" { LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_cyg_profile_fast, func_entry, LTTNG_UST_TP_ARGS(void *, func_addr), LTTNG_UST_TP_FIELDS( - ctf_integer_hex(unsigned long, addr, + lttng_ust_field_integer_hex(unsigned long, addr, (unsigned long) func_addr) ) ) diff --git a/src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile.h b/src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile.h index c4e22e3c..8661163b 100644 --- a/src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile.h +++ b/src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile.h @@ -19,9 +19,9 @@ extern "C" { LTTNG_UST_TRACEPOINT_EVENT_CLASS(lttng_ust_cyg_profile, func_class, LTTNG_UST_TP_ARGS(void *, func_addr, void *, call_site), LTTNG_UST_TP_FIELDS( - ctf_integer_hex(unsigned long, addr, + lttng_ust_field_integer_hex(unsigned long, addr, (unsigned long) func_addr) - ctf_integer_hex(unsigned long, call_site, + lttng_ust_field_integer_hex(unsigned long, call_site, (unsigned long) call_site) ) ) diff --git a/src/lib/lttng-ust-dl/ust_dl.h b/src/lib/lttng-ust-dl/ust_dl.h index 02866932..671d25da 100644 --- a/src/lib/lttng-ust-dl/ust_dl.h +++ b/src/lib/lttng-ust-dl/ust_dl.h @@ -28,12 +28,12 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_dl, dlopen, uint8_t, has_debug_link), LTTNG_UST_TP_FIELDS( ctf_unused(ip) - ctf_integer_hex(void *, baddr, baddr) - ctf_integer(uint64_t, memsz, memsz) - ctf_integer_hex(int, flags, flags) + lttng_ust_field_integer_hex(void *, baddr, baddr) + lttng_ust_field_integer(uint64_t, memsz, memsz) + lttng_ust_field_integer_hex(int, flags, flags) ctf_string(path, path) - ctf_integer(uint8_t, has_build_id, has_build_id) - ctf_integer(uint8_t, has_debug_link, has_debug_link) + lttng_ust_field_integer(uint8_t, has_build_id, has_build_id) + lttng_ust_field_integer(uint8_t, has_debug_link, has_debug_link) ) ) @@ -45,13 +45,13 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_dl, dlmopen, uint8_t, has_debug_link), LTTNG_UST_TP_FIELDS( ctf_unused(ip) - ctf_integer_hex(void *, baddr, baddr) - ctf_integer(uint64_t, memsz, memsz) - ctf_integer(Lmid_t, nsid, nsid) - ctf_integer_hex(int, flags, flags) + lttng_ust_field_integer_hex(void *, baddr, baddr) + lttng_ust_field_integer(uint64_t, memsz, memsz) + lttng_ust_field_integer(Lmid_t, nsid, nsid) + lttng_ust_field_integer_hex(int, flags, flags) ctf_string(path, path) - ctf_integer(uint8_t, has_build_id, has_build_id) - ctf_integer(uint8_t, has_debug_link, has_debug_link) + lttng_ust_field_integer(uint8_t, has_build_id, has_build_id) + lttng_ust_field_integer(uint8_t, has_debug_link, has_debug_link) ) ) #endif @@ -65,7 +65,7 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_dl, build_id, ), LTTNG_UST_TP_FIELDS( ctf_unused(ip) - ctf_integer_hex(void *, baddr, baddr) + lttng_ust_field_integer_hex(void *, baddr, baddr) ctf_sequence_hex(uint8_t, build_id, build_id, size_t, build_id_len) ) @@ -80,8 +80,8 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_dl, debug_link, ), LTTNG_UST_TP_FIELDS( ctf_unused(ip) - ctf_integer_hex(void *, baddr, baddr) - ctf_integer(uint32_t, crc, crc) + lttng_ust_field_integer_hex(void *, baddr, baddr) + lttng_ust_field_integer(uint32_t, crc, crc) ctf_string(filename, filename) ) ) @@ -90,7 +90,7 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_dl, dlclose, LTTNG_UST_TP_ARGS(void *, ip, void *, baddr), LTTNG_UST_TP_FIELDS( ctf_unused(ip) - ctf_integer_hex(void *, baddr, baddr) + lttng_ust_field_integer_hex(void *, baddr, baddr) ) ) diff --git a/src/lib/lttng-ust-java-agent/jni/jul/lttng_ust_jul.h b/src/lib/lttng-ust-java-agent/jni/jul/lttng_ust_jul.h index 5a28f63e..b180f086 100644 --- a/src/lib/lttng-ust-java-agent/jni/jul/lttng_ust_jul.h +++ b/src/lib/lttng-ust-java-agent/jni/jul/lttng_ust_jul.h @@ -29,9 +29,9 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_jul, event, ctf_string(logger_name, logger_name) ctf_string(class_name, class_name) ctf_string(method_name, method_name) - ctf_integer(long, long_millis, millis) - ctf_integer(int, int_loglevel, log_level) - ctf_integer(int, int_threadid, thread_id) + lttng_ust_field_integer(long, long_millis, millis) + lttng_ust_field_integer(int, int_loglevel, log_level) + lttng_ust_field_integer(int, int_threadid, thread_id) ) ) diff --git a/src/lib/lttng-ust-java-agent/jni/log4j/lttng_ust_log4j.h b/src/lib/lttng-ust-java-agent/jni/log4j/lttng_ust_log4j.h index 53406a04..16cbdc3b 100644 --- a/src/lib/lttng-ust-java-agent/jni/log4j/lttng_ust_log4j.h +++ b/src/lib/lttng-ust-java-agent/jni/log4j/lttng_ust_log4j.h @@ -32,9 +32,9 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_log4j, event, ctf_string(class_name, class_name) ctf_string(method_name, method_name) ctf_string(filename, file_name) - ctf_integer(int, line_number, line_number) - ctf_integer(long, timestamp, timestamp) - ctf_integer(int, int_loglevel, log_level) + lttng_ust_field_integer(int, line_number, line_number) + lttng_ust_field_integer(long, timestamp, timestamp) + lttng_ust_field_integer(int, int_loglevel, log_level) ctf_string(thread_name, thread_name) ) ) diff --git a/src/lib/lttng-ust-java/lttng_ust_java.h b/src/lib/lttng-ust-java/lttng_ust_java.h index 545d891e..82f23577 100644 --- a/src/lib/lttng-ust-java/lttng_ust_java.h +++ b/src/lib/lttng-ust-java/lttng_ust_java.h @@ -16,7 +16,7 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_java, int_event, LTTNG_UST_TP_ARGS(const char *, name, int, payload), LTTNG_UST_TP_FIELDS( ctf_string(name, name) - ctf_integer(int, int_payload, payload) + lttng_ust_field_integer(int, int_payload, payload) ) ) @@ -24,8 +24,8 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_java, int_int_event, LTTNG_UST_TP_ARGS(const char *, name, int, payload1, int, payload2), LTTNG_UST_TP_FIELDS( ctf_string(name, name) - ctf_integer(int, int_payload1, payload1) - ctf_integer(int, int_payload2, payload2) + lttng_ust_field_integer(int, int_payload1, payload1) + lttng_ust_field_integer(int, int_payload2, payload2) ) ) @@ -33,7 +33,7 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_java, long_event, LTTNG_UST_TP_ARGS(const char *, name, long, payload), LTTNG_UST_TP_FIELDS( ctf_string(name, name) - ctf_integer(long, long_payload, payload) + lttng_ust_field_integer(long, long_payload, payload) ) ) @@ -41,8 +41,8 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_java, long_long_event, LTTNG_UST_TP_ARGS(const char *, name, long, payload1, long, payload2), LTTNG_UST_TP_FIELDS( ctf_string(name, name) - ctf_integer(long, long_payload1, payload1) - ctf_integer(long, long_payload2, payload2) + lttng_ust_field_integer(long, long_payload1, payload1) + lttng_ust_field_integer(long, long_payload2, payload2) ) ) diff --git a/src/lib/lttng-ust-libc-wrapper/ust_libc.h b/src/lib/lttng-ust-libc-wrapper/ust_libc.h index bd7bb3a2..8893fdb7 100644 --- a/src/lib/lttng-ust-libc-wrapper/ust_libc.h +++ b/src/lib/lttng-ust-libc-wrapper/ust_libc.h @@ -19,8 +19,8 @@ extern "C" { LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_libc, malloc, LTTNG_UST_TP_ARGS(size_t, size, void *, ptr, void *, ip), LTTNG_UST_TP_FIELDS( - ctf_integer(size_t, size, size) - ctf_integer_hex(void *, ptr, ptr) + lttng_ust_field_integer(size_t, size, size) + lttng_ust_field_integer_hex(void *, ptr, ptr) ctf_unused(ip) ) ) @@ -28,7 +28,7 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_libc, malloc, LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_libc, free, LTTNG_UST_TP_ARGS(void *, ptr, void *, ip), LTTNG_UST_TP_FIELDS( - ctf_integer_hex(void *, ptr, ptr) + lttng_ust_field_integer_hex(void *, ptr, ptr) ctf_unused(ip) ) ) @@ -36,9 +36,9 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_libc, free, LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_libc, calloc, LTTNG_UST_TP_ARGS(size_t, nmemb, size_t, size, void *, ptr, void *, ip), LTTNG_UST_TP_FIELDS( - ctf_integer(size_t, nmemb, nmemb) - ctf_integer(size_t, size, size) - ctf_integer_hex(void *, ptr, ptr) + lttng_ust_field_integer(size_t, nmemb, nmemb) + lttng_ust_field_integer(size_t, size, size) + lttng_ust_field_integer_hex(void *, ptr, ptr) ctf_unused(ip) ) ) @@ -46,9 +46,9 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_libc, calloc, LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_libc, realloc, LTTNG_UST_TP_ARGS(void *, in_ptr, size_t, size, void *, ptr, void *, ip), LTTNG_UST_TP_FIELDS( - ctf_integer_hex(void *, in_ptr, in_ptr) - ctf_integer(size_t, size, size) - ctf_integer_hex(void *, ptr, ptr) + lttng_ust_field_integer_hex(void *, in_ptr, in_ptr) + lttng_ust_field_integer(size_t, size, size) + lttng_ust_field_integer_hex(void *, ptr, ptr) ctf_unused(ip) ) ) @@ -56,9 +56,9 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_libc, realloc, LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_libc, memalign, LTTNG_UST_TP_ARGS(size_t, alignment, size_t, size, void *, ptr, void *, ip), LTTNG_UST_TP_FIELDS( - ctf_integer(size_t, alignment, alignment) - ctf_integer(size_t, size, size) - ctf_integer_hex(void *, ptr, ptr) + lttng_ust_field_integer(size_t, alignment, alignment) + lttng_ust_field_integer(size_t, size, size) + lttng_ust_field_integer_hex(void *, ptr, ptr) ctf_unused(ip) ) ) @@ -66,10 +66,10 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_libc, memalign, LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_libc, posix_memalign, LTTNG_UST_TP_ARGS(void *, out_ptr, size_t, alignment, size_t, size, int, result, void *, ip), LTTNG_UST_TP_FIELDS( - ctf_integer_hex(void *, out_ptr, out_ptr) - ctf_integer(size_t, alignment, alignment) - ctf_integer(size_t, size, size) - ctf_integer(int, result, result) + lttng_ust_field_integer_hex(void *, out_ptr, out_ptr) + lttng_ust_field_integer(size_t, alignment, alignment) + lttng_ust_field_integer(size_t, size, size) + lttng_ust_field_integer(int, result, result) ctf_unused(ip) ) ) diff --git a/src/lib/lttng-ust-pthread-wrapper/ust_pthread.h b/src/lib/lttng-ust-pthread-wrapper/ust_pthread.h index c17ba4ab..50b04040 100644 --- a/src/lib/lttng-ust-pthread-wrapper/ust_pthread.h +++ b/src/lib/lttng-ust-pthread-wrapper/ust_pthread.h @@ -19,7 +19,7 @@ extern "C" { LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_pthread, pthread_mutex_lock_req, LTTNG_UST_TP_ARGS(pthread_mutex_t *, mutex, void *, ip), LTTNG_UST_TP_FIELDS( - ctf_integer_hex(void *, mutex, mutex) + lttng_ust_field_integer_hex(void *, mutex, mutex) ctf_unused(ip) ) ) @@ -27,8 +27,8 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_pthread, pthread_mutex_lock_req, LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_pthread, pthread_mutex_lock_acq, LTTNG_UST_TP_ARGS(pthread_mutex_t *, mutex, int, status, void *, ip), LTTNG_UST_TP_FIELDS( - ctf_integer_hex(void *, mutex, mutex) - ctf_integer(int, status, status) + lttng_ust_field_integer_hex(void *, mutex, mutex) + lttng_ust_field_integer(int, status, status) ctf_unused(ip) ) ) @@ -36,8 +36,8 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_pthread, pthread_mutex_lock_acq, LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_pthread, pthread_mutex_trylock, LTTNG_UST_TP_ARGS(pthread_mutex_t *, mutex, int, status, void *, ip), LTTNG_UST_TP_FIELDS( - ctf_integer_hex(void *, mutex, mutex) - ctf_integer(int, status, status) + lttng_ust_field_integer_hex(void *, mutex, mutex) + lttng_ust_field_integer(int, status, status) ctf_unused(ip) ) ) @@ -45,8 +45,8 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_pthread, pthread_mutex_trylock, LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_pthread, pthread_mutex_unlock, LTTNG_UST_TP_ARGS(pthread_mutex_t *, mutex, int, status, void *, ip), LTTNG_UST_TP_FIELDS( - ctf_integer_hex(void *, mutex, mutex) - ctf_integer(int, status, status) + lttng_ust_field_integer_hex(void *, mutex, mutex) + lttng_ust_field_integer(int, status, status) ctf_unused(ip) ) ) diff --git a/src/lib/lttng-ust-python-agent/lttng_ust_python.h b/src/lib/lttng-ust-python-agent/lttng_ust_python.h index 677ad94a..c9bfdd0c 100644 --- a/src/lib/lttng-ust-python-agent/lttng_ust_python.h +++ b/src/lib/lttng-ust-python-agent/lttng_ust_python.h @@ -29,9 +29,9 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_python, event, ctf_string(msg, msg) ctf_string(logger_name, logger_name) ctf_string(funcName, funcName) - ctf_integer(unsigned int, lineno, lineno) - ctf_integer(unsigned int, int_loglevel, int_loglevel) - ctf_integer(unsigned int, thread, thread) + lttng_ust_field_integer(unsigned int, lineno, lineno) + lttng_ust_field_integer(unsigned int, int_loglevel, int_loglevel) + lttng_ust_field_integer(unsigned int, thread, thread) ctf_string(threadName, threadName) ) ) diff --git a/src/lib/lttng-ust/lttng-ust-statedump-provider.h b/src/lib/lttng-ust/lttng-ust-statedump-provider.h index df5c178b..0805d546 100644 --- a/src/lib/lttng-ust/lttng-ust-statedump-provider.h +++ b/src/lib/lttng-ust/lttng-ust-statedump-provider.h @@ -42,12 +42,12 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_statedump, bin_info, ), LTTNG_UST_TP_FIELDS( ctf_unused(session) - ctf_integer_hex(void *, baddr, baddr) - ctf_integer(uint64_t, memsz, memsz) + lttng_ust_field_integer_hex(void *, baddr, baddr) + lttng_ust_field_integer(uint64_t, memsz, memsz) ctf_string(path, path) - ctf_integer(uint8_t, is_pic, is_pic) - ctf_integer(uint8_t, has_build_id, has_build_id) - ctf_integer(uint8_t, has_debug_link, has_debug_link) + lttng_ust_field_integer(uint8_t, is_pic, is_pic) + lttng_ust_field_integer(uint8_t, has_build_id, has_build_id) + lttng_ust_field_integer(uint8_t, has_debug_link, has_debug_link) ) ) @@ -60,7 +60,7 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_statedump, build_id, ), LTTNG_UST_TP_FIELDS( ctf_unused(session) - ctf_integer_hex(void *, baddr, baddr) + lttng_ust_field_integer_hex(void *, baddr, baddr) ctf_sequence_hex(uint8_t, build_id, build_id, size_t, build_id_len) ) @@ -75,8 +75,8 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_statedump, debug_link, ), LTTNG_UST_TP_FIELDS( ctf_unused(session) - ctf_integer_hex(void *, baddr, baddr) - ctf_integer(uint32_t, crc, crc) + lttng_ust_field_integer_hex(void *, baddr, baddr) + lttng_ust_field_integer(uint32_t, crc, crc) ctf_string(filename, filename) ) ) diff --git a/src/lib/lttng-ust/ust_lib.h b/src/lib/lttng-ust/ust_lib.h index 3bf94c25..f60e8fd7 100644 --- a/src/lib/lttng-ust/ust_lib.h +++ b/src/lib/lttng-ust/ust_lib.h @@ -29,11 +29,11 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_lib, load, uint8_t, has_debug_link), LTTNG_UST_TP_FIELDS( ctf_unused(ip) - ctf_integer_hex(void *, baddr, baddr) - ctf_integer(uint64_t, memsz, memsz) + lttng_ust_field_integer_hex(void *, baddr, baddr) + lttng_ust_field_integer(uint64_t, memsz, memsz) ctf_string(path, path) - ctf_integer(uint8_t, has_build_id, has_build_id) - ctf_integer(uint8_t, has_debug_link, has_debug_link) + lttng_ust_field_integer(uint8_t, has_build_id, has_build_id) + lttng_ust_field_integer(uint8_t, has_debug_link, has_debug_link) ) ) @@ -46,7 +46,7 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_lib, build_id, ), LTTNG_UST_TP_FIELDS( ctf_unused(ip) - ctf_integer_hex(void *, baddr, baddr) + lttng_ust_field_integer_hex(void *, baddr, baddr) ctf_sequence_hex(uint8_t, build_id, build_id, size_t, build_id_len) ) @@ -61,8 +61,8 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_lib, debug_link, ), LTTNG_UST_TP_FIELDS( ctf_unused(ip) - ctf_integer_hex(void *, baddr, baddr) - ctf_integer(uint32_t, crc, crc) + lttng_ust_field_integer_hex(void *, baddr, baddr) + lttng_ust_field_integer(uint32_t, crc, crc) ctf_string(filename, filename) ) ) @@ -71,7 +71,7 @@ LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_lib, unload, LTTNG_UST_TP_ARGS(void *, ip, void *, baddr), LTTNG_UST_TP_FIELDS( ctf_unused(ip) - ctf_integer_hex(void *, baddr, baddr) + lttng_ust_field_integer_hex(void *, baddr, baddr) ) ) diff --git a/tests/benchmark/ust_tests_benchmark.h b/tests/benchmark/ust_tests_benchmark.h index 820731b7..e91c7b28 100644 --- a/tests/benchmark/ust_tests_benchmark.h +++ b/tests/benchmark/ust_tests_benchmark.h @@ -15,7 +15,7 @@ LTTNG_UST_TRACEPOINT_EVENT(ust_tests_benchmark, tpbench, LTTNG_UST_TP_ARGS(int, value), LTTNG_UST_TP_FIELDS( - ctf_integer(int, event, value) + lttng_ust_field_integer(int, event, value) ) ) diff --git a/tests/compile/ctf-types/ust_tests_ctf_types.h b/tests/compile/ctf-types/ust_tests_ctf_types.h index 3721045c..a0fb0b34 100644 --- a/tests/compile/ctf-types/ust_tests_ctf_types.h +++ b/tests/compile/ctf-types/ust_tests_ctf_types.h @@ -36,7 +36,7 @@ LTTNG_UST_TRACEPOINT_ENUM(ust_tests_ctf_types, testenum2, LTTNG_UST_TRACEPOINT_EVENT(ust_tests_ctf_types, tptest, LTTNG_UST_TP_ARGS(int, anint, int, enumval, int, enumval2), LTTNG_UST_TP_FIELDS( - ctf_integer(int, intfield, anint) + lttng_ust_field_integer(int, intfield, anint) ctf_enum(ust_tests_ctf_types, testenum, int, enumfield, enumval) ctf_enum(ust_tests_ctf_types, testenum, long long, enumfield_bis, enumval) @@ -52,7 +52,7 @@ LTTNG_UST_TRACEPOINT_EVENT(ust_tests_ctf_types, tptest, LTTNG_UST_TRACEPOINT_EVENT(ust_tests_ctf_types, tptest_bis, LTTNG_UST_TP_ARGS(int, anint, int, enumval), LTTNG_UST_TP_FIELDS( - ctf_integer(int, intfield, anint) + lttng_ust_field_integer(int, intfield, anint) ctf_enum(ust_tests_ctf_types, testenum, unsigned char, enumfield, enumval) ) diff --git a/tests/compile/hello.cxx/ust_tests_hello.h b/tests/compile/hello.cxx/ust_tests_hello.h index 241fb044..699a6590 100644 --- a/tests/compile/hello.cxx/ust_tests_hello.h +++ b/tests/compile/hello.cxx/ust_tests_hello.h @@ -30,11 +30,11 @@ LTTNG_UST_TRACEPOINT_EVENT(ust_tests_hello, tptest, double, doublearg, float, floatarg, int, enumarg), LTTNG_UST_TP_FIELDS( - ctf_integer(int, intfield, anint) - ctf_integer_hex(int, intfield2, anint) - ctf_integer(long, longfield, anint) - ctf_integer_network(int, netintfield, netint) - ctf_integer_network_hex(int, netintfieldhex, netint) + lttng_ust_field_integer(int, intfield, anint) + lttng_ust_field_integer_hex(int, intfield2, anint) + lttng_ust_field_integer(long, longfield, anint) + lttng_ust_field_integer_network(int, netintfield, netint) + lttng_ust_field_integer_network_hex(int, netintfieldhex, netint) ctf_array(long, arrfield1, values, 3) ctf_array_text(char, arrfield2, text, 10) ctf_sequence(char, seqfield1, text, diff --git a/tests/compile/hello/ust_tests_hello.h b/tests/compile/hello/ust_tests_hello.h index 7cd0f822..2ef4ca4f 100644 --- a/tests/compile/hello/ust_tests_hello.h +++ b/tests/compile/hello/ust_tests_hello.h @@ -20,11 +20,11 @@ LTTNG_UST_TRACEPOINT_EVENT(ust_tests_hello, tptest, double, doublearg, float, floatarg, bool, boolarg), LTTNG_UST_TP_FIELDS( - ctf_integer(int, intfield, anint) - ctf_integer_hex(int, intfield2, anint) - ctf_integer(long, longfield, anint) - ctf_integer_network(int, netintfield, netint) - ctf_integer_network_hex(int, netintfieldhex, netint) + lttng_ust_field_integer(int, intfield, anint) + lttng_ust_field_integer_hex(int, intfield2, anint) + lttng_ust_field_integer(long, longfield, anint) + lttng_ust_field_integer_network(int, netintfield, netint) + lttng_ust_field_integer_network_hex(int, netintfieldhex, netint) ctf_array_nowrite(long, arrfield1z, values, 3) ctf_array(long, blah, values, 3) ctf_array(long, arrfield1, values, 3) @@ -45,8 +45,8 @@ LTTNG_UST_TRACEPOINT_EVENT(ust_tests_hello, tptest, ctf_string(stringfield, text) ctf_float(float, floatfield, floatarg) ctf_float(double, doublefield, doublearg) - ctf_integer(bool, boolfield, boolarg) - ctf_integer_nowrite(int, filterfield, anint) + lttng_ust_field_integer(bool, boolfield, boolarg) + lttng_ust_field_integer_nowrite(int, filterfield, anint) ) ) diff --git a/tests/compile/test-app-ctx/ust_tests_hello.h b/tests/compile/test-app-ctx/ust_tests_hello.h index 3e0e4d01..8305bce4 100644 --- a/tests/compile/test-app-ctx/ust_tests_hello.h +++ b/tests/compile/test-app-ctx/ust_tests_hello.h @@ -20,11 +20,11 @@ LTTNG_UST_TRACEPOINT_EVENT(ust_tests_hello, tptest, double, doublearg, float, floatarg, bool, boolarg), LTTNG_UST_TP_FIELDS( - ctf_integer(int, intfield, anint) - ctf_integer_hex(int, intfield2, anint) - ctf_integer(long, longfield, anint) - ctf_integer_network(int, netintfield, netint) - ctf_integer_network_hex(int, netintfieldhex, netint) + lttng_ust_field_integer(int, intfield, anint) + lttng_ust_field_integer_hex(int, intfield2, anint) + lttng_ust_field_integer(long, longfield, anint) + lttng_ust_field_integer_network(int, netintfield, netint) + lttng_ust_field_integer_network_hex(int, netintfieldhex, netint) ctf_array(long, arrfield1, values, 3) ctf_array_text(char, arrfield2, text, 10) ctf_sequence(char, seqfield1, text, @@ -34,8 +34,8 @@ LTTNG_UST_TRACEPOINT_EVENT(ust_tests_hello, tptest, ctf_string(stringfield, text) ctf_float(float, floatfield, floatarg) ctf_float(double, doublefield, doublearg) - ctf_integer(bool, boolfield, boolarg) - ctf_integer_nowrite(int, filterfield, anint) + lttng_ust_field_integer(bool, boolfield, boolarg) + lttng_ust_field_integer_nowrite(int, filterfield, anint) ) ) -- 2.34.1