Cleanup: tracepoint event: use different prefixes for provider and event descriptors
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 4 Apr 2022 19:55:07 +0000 (15:55 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 4 Apr 2022 20:03:56 +0000 (16:03 -0400)
Prefix the provider array of descriptor identifier with
"lttng_ust__provider_event_desc___" to distinguish it from the event
descriptor identifier.

This does not cause any conflict even when the event has the same name
as the provider because the provider is included in the event name. But
providing different prefixes is cleaner.

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

include/lttng/ust-tracepoint-event.h

index 1edb50c13d295cac4d0f973223dc1c3453ee285e..86098a9847f8cc0dc83d9f0b0dbcda219c29e79b 100644 (file)
@@ -1136,7 +1136,7 @@ static const struct lttng_ust_event_desc lttng_ust__event_desc___##_provider##_#
 #define LTTNG_UST__TRACEPOINT_EVENT_INSTANCE(_template_provider, _template_name, _provider, _name, _args) \
        &lttng_ust__event_desc___##_provider##_##_name,
 
-static const struct lttng_ust_event_desc * const LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__event_desc___, LTTNG_UST_TRACEPOINT_PROVIDER)[] = {
+static const struct lttng_ust_event_desc * const LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__provider_event_desc___, LTTNG_UST_TRACEPOINT_PROVIDER)[] = {
 #include LTTNG_UST_TRACEPOINT_INCLUDE
        NULL,   /* Dummy, C99 forbids 0-len array. */
 };
@@ -1151,8 +1151,8 @@ static const struct lttng_ust_event_desc * const LTTNG_UST__TP_COMBINE_TOKENS(lt
 const struct lttng_ust_probe_desc LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__probe_desc___, LTTNG_UST_TRACEPOINT_PROVIDER) = {
        .struct_size = sizeof(struct lttng_ust_probe_desc),
        .provider_name = lttng_ust__tp_stringify(LTTNG_UST_TRACEPOINT_PROVIDER),
-       .event_desc = LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__event_desc___, LTTNG_UST_TRACEPOINT_PROVIDER),
-       .nr_events = LTTNG_UST__TP_ARRAY_SIZE(LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__event_desc___, LTTNG_UST_TRACEPOINT_PROVIDER)) - 1,
+       .event_desc = LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__provider_event_desc___, LTTNG_UST_TRACEPOINT_PROVIDER),
+       .nr_events = LTTNG_UST__TP_ARRAY_SIZE(LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__provider_event_desc___, LTTNG_UST_TRACEPOINT_PROVIDER)) - 1,
        .major = LTTNG_UST_PROVIDER_MAJOR,
        .minor = LTTNG_UST_PROVIDER_MINOR,
 };
This page took 0.026453 seconds and 4 git commands to generate.