From dbcc2f9279a03c620350b4743467aa2f7cb7bf5f Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Tue, 20 Apr 2021 13:49:22 -0400 Subject: [PATCH] Tracepoint API namespacing 'TRACEPOINT_MODEL_EMF_URI' 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: Ib0aa6d868dde81bd7deb79d3a41d826bf6ed6419 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- doc/examples/demo/ust_tests_demo.h | 4 ++-- include/lttng/tracepoint-event.h | 4 ++-- include/lttng/tracepoint.h | 10 +++++++--- include/lttng/ust-tracepoint-event-reset.h | 4 ++-- include/lttng/ust-tracepoint-event.h | 4 ++-- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/doc/examples/demo/ust_tests_demo.h b/doc/examples/demo/ust_tests_demo.h index b9384f48..e392228d 100644 --- a/doc/examples/demo/ust_tests_demo.h +++ b/doc/examples/demo/ust_tests_demo.h @@ -24,7 +24,7 @@ LTTNG_UST_TRACEPOINT_LOGLEVEL(ust_tests_demo, starting, LTTNG_UST_TRACEPOINT_LOG * Dummy model information, just for example. TODO: we should check if * EMF model URI have some standard format we should follow. */ -TRACEPOINT_MODEL_EMF_URI(ust_tests_demo, starting, +LTTNG_UST_TRACEPOINT_MODEL_EMF_URI(ust_tests_demo, starting, "http://example.com/path_to_model?q=ust_tests_demo:starting") LTTNG_UST_TRACEPOINT_EVENT(ust_tests_demo, done, @@ -35,7 +35,7 @@ LTTNG_UST_TRACEPOINT_EVENT(ust_tests_demo, done, ) LTTNG_UST_TRACEPOINT_LOGLEVEL(ust_tests_demo, done, LTTNG_UST_TRACEPOINT_LOGLEVEL_CRIT) -TRACEPOINT_MODEL_EMF_URI(ust_tests_demo, done, +LTTNG_UST_TRACEPOINT_MODEL_EMF_URI(ust_tests_demo, done, "http://example.com/path_to_model?q=ust_tests_demo:done") #endif /* _TRACEPOINT_UST_TESTS_DEMO_H */ diff --git a/include/lttng/tracepoint-event.h b/include/lttng/tracepoint-event.h index 829e962d..f97b67d1 100644 --- a/include/lttng/tracepoint-event.h +++ b/include/lttng/tracepoint-event.h @@ -56,7 +56,7 @@ #undef LTTNG_UST_TRACEPOINT_LOGLEVEL #define LTTNG_UST_TRACEPOINT_LOGLEVEL(provider, name, loglevel) -#undef TRACEPOINT_MODEL_EMF_URI -#define TRACEPOINT_MODEL_EMF_URI(provider, name, uri) +#undef LTTNG_UST_TRACEPOINT_MODEL_EMF_URI +#define LTTNG_UST_TRACEPOINT_MODEL_EMF_URI(provider, name, uri) #endif /* TRACEPOINT_CREATE_PROBES */ diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h index 8fa73ce7..5d30703e 100644 --- a/include/lttng/tracepoint.h +++ b/include/lttng/tracepoint.h @@ -861,8 +861,12 @@ enum { #endif /* #ifndef LTTNG_UST_TRACEPOINT_LOGLEVEL */ -#ifndef TRACEPOINT_MODEL_EMF_URI +#ifndef LTTNG_UST_TRACEPOINT_MODEL_EMF_URI -#define TRACEPOINT_MODEL_EMF_URI(provider, name, uri) +#define LTTNG_UST_TRACEPOINT_MODEL_EMF_URI(provider, name, uri) -#endif /* #ifndef TRACEPOINT_MODEL_EMF_URI */ +#if LTTNG_UST_COMPAT_API(0) +#define TRACEPOINT_MODEL_EMF_URI LTTNG_UST_TRACEPOINT_MODEL_EMF_URI +#endif + +#endif /* #ifndef LTTNG_UST_TRACEPOINT_MODEL_EMF_URI */ diff --git a/include/lttng/ust-tracepoint-event-reset.h b/include/lttng/ust-tracepoint-event-reset.h index 5acf5a1b..f70b9df8 100644 --- a/include/lttng/ust-tracepoint-event-reset.h +++ b/include/lttng/ust-tracepoint-event-reset.h @@ -24,8 +24,8 @@ #undef LTTNG_UST_TRACEPOINT_LOGLEVEL #define LTTNG_UST_TRACEPOINT_LOGLEVEL(provider, name, loglevel) -#undef TRACEPOINT_MODEL_EMF_URI -#define TRACEPOINT_MODEL_EMF_URI(provider, name, uri) +#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, \ diff --git a/include/lttng/ust-tracepoint-event.h b/include/lttng/ust-tracepoint-event.h index 569431f1..acd315c7 100644 --- a/include/lttng/ust-tracepoint-event.h +++ b/include/lttng/ust-tracepoint-event.h @@ -1003,8 +1003,8 @@ LTTNG_UST_TP_EXTERN_C const int * const _loglevel___##__provider##___##__name \ #define LTTNG_UST_TP_EXTERN_C #endif -#undef TRACEPOINT_MODEL_EMF_URI -#define TRACEPOINT_MODEL_EMF_URI(__provider, __name, __uri) \ +#undef LTTNG_UST_TRACEPOINT_MODEL_EMF_URI +#define LTTNG_UST_TRACEPOINT_MODEL_EMF_URI(__provider, __name, __uri) \ LTTNG_UST_TP_EXTERN_C const char * const _model_emf_uri___##__provider##___##__name \ __attribute__((visibility("hidden"))) = __uri; \ -- 2.34.1