From 5defa7746a21c5afdce5ac0f6a4c34795a61a272 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 15 Apr 2021 15:53:03 -0400 Subject: [PATCH] Rename __LTTNG_COMPOUND_LITERAL to LTTNG_UST_COMPOUND_LITERAL Signed-off-by: Mathieu Desnoyers Change-Id: Id92634444681f187ce6d4b15a64c739e93d243f2 --- include/lttng/ust-compiler.h | 6 ++-- include/lttng/ust-events.h | 4 +-- include/lttng/ust-tracepoint-event.h | 28 ++++++++-------- src/common/events.h | 8 ++--- .../lttng-ring-buffer-client-template.h | 2 +- ...tng-ring-buffer-metadata-client-template.h | 2 +- src/lib/lttng-ust/lttng-ust-dynamic-type.c | 32 +++++++++---------- 7 files changed, 41 insertions(+), 41 deletions(-) diff --git a/include/lttng/ust-compiler.h b/include/lttng/ust-compiler.h index 7c858f87..475caa30 100644 --- a/include/lttng/ust-compiler.h +++ b/include/lttng/ust-compiler.h @@ -48,12 +48,12 @@ * allocates those on the heap in C++. * * Example use: - * static struct mystruct *var = __LTTNG_COMPOUND_LITERAL(struct mystruct, { 1, 2, 3 }); + * static struct mystruct *var = LTTNG_UST_COMPOUND_LITERAL(struct mystruct, { 1, 2, 3 }); */ #if defined (__cplusplus) && defined (LTTNG_ALLOCATE_COMPOUND_LITERAL_ON_HEAP) -#define __LTTNG_COMPOUND_LITERAL(type, ...) new (type) __VA_ARGS__ +#define LTTNG_UST_COMPOUND_LITERAL(type, ...) new (type) __VA_ARGS__ #else -#define __LTTNG_COMPOUND_LITERAL(type, ...) (type[]) { __VA_ARGS__ } +#define LTTNG_UST_COMPOUND_LITERAL(type, ...) (type[]) { __VA_ARGS__ } #endif /* diff --git a/include/lttng/ust-events.h b/include/lttng/ust-events.h index 95b4698d..63a6f158 100644 --- a/include/lttng/ust-events.h +++ b/include/lttng/ust-events.h @@ -117,7 +117,7 @@ struct lttng_ust_type_integer { }; #define lttng_ust_type_integer_define(_type, _byte_order, _base) \ - ((struct lttng_ust_type_common *) __LTTNG_COMPOUND_LITERAL(struct lttng_ust_type_integer, { \ + ((struct lttng_ust_type_common *) LTTNG_UST_COMPOUND_LITERAL(struct lttng_ust_type_integer, { \ .parent = { \ .type = lttng_ust_type_integer, \ }, \ @@ -148,7 +148,7 @@ struct lttng_ust_type_float { : 0)) #define lttng_ust_type_float_define(_type) \ - ((struct lttng_ust_type_common *) __LTTNG_COMPOUND_LITERAL(struct lttng_ust_type_float, { \ + ((struct lttng_ust_type_common *) LTTNG_UST_COMPOUND_LITERAL(struct lttng_ust_type_float, { \ .parent = { \ .type = lttng_ust_type_float, \ }, \ diff --git a/include/lttng/ust-tracepoint-event.h b/include/lttng/ust-tracepoint-event.h index 0a97f0df..885093a2 100644 --- a/include/lttng/ust-tracepoint-event.h +++ b/include/lttng/ust-tracepoint-event.h @@ -150,7 +150,7 @@ void __event_template_proto___##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args) /* Enumeration entry (single value) */ #undef ctf_enum_value #define ctf_enum_value(_string, _value) \ - __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_enum_entry, { \ + LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_enum_entry, { \ .struct_size = sizeof(struct lttng_ust_enum_entry), \ .start = { \ .value = lttng_ust_is_signed_type(__typeof__(_value)) ? \ @@ -168,7 +168,7 @@ void __event_template_proto___##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args) /* Enumeration entry (range) */ #undef ctf_enum_range #define ctf_enum_range(_string, _range_start, _range_end) \ - __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_enum_entry, { \ + LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_enum_entry, { \ .struct_size = sizeof(struct lttng_ust_enum_entry), \ .start = { \ .value = lttng_ust_is_signed_type(__typeof__(_range_start)) ? \ @@ -186,7 +186,7 @@ void __event_template_proto___##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args) /* Enumeration entry (automatic value; follows the rules of CTF) */ #undef ctf_enum_auto #define ctf_enum_auto(_string) \ - __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_enum_entry, { \ + LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_enum_entry, { \ .struct_size = sizeof(struct lttng_ust_enum_entry), \ .start = { \ .value = -1ULL, \ @@ -257,7 +257,7 @@ void __event_template_proto___##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args) #undef _ctf_integer_ext #define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite) \ - __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \ + LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \ .struct_size = sizeof(struct lttng_ust_event_field), \ .name = #_item, \ .type = lttng_ust_type_integer_define(_type, _byte_order, _base), \ @@ -267,7 +267,7 @@ void __event_template_proto___##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args) #undef _ctf_float #define _ctf_float(_type, _item, _src, _nowrite) \ - __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \ + LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \ .struct_size = sizeof(struct lttng_ust_event_field), \ .name = #_item, \ .type = lttng_ust_type_float_define(_type), \ @@ -279,10 +279,10 @@ void __event_template_proto___##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args) #define _ctf_array_encoded(_type, _item, _src, _byte_order, \ _length, _encoding, _nowrite, \ _elem_type_base) \ - __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \ + LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \ .struct_size = sizeof(struct lttng_ust_event_field), \ .name = #_item, \ - .type = (const struct lttng_ust_type_common *) __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_type_array, { \ + .type = (const struct lttng_ust_type_common *) LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_type_array, { \ .parent = { \ .type = lttng_ust_type_array, \ }, \ @@ -300,17 +300,17 @@ void __event_template_proto___##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args) #define _ctf_sequence_encoded(_type, _item, _src, _byte_order, \ _length_type, _src_length, _encoding, _nowrite, \ _elem_type_base) \ - __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \ + LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \ .struct_size = sizeof(struct lttng_ust_event_field), \ .name = "_" #_item "_length", \ .type = lttng_ust_type_integer_define(_length_type, BYTE_ORDER, 10), \ .nowrite = _nowrite, \ .nofilter = 1, \ }), \ - __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \ + LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \ .struct_size = sizeof(struct lttng_ust_event_field), \ .name = #_item, \ - .type = (const struct lttng_ust_type_common *) __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_type_sequence, { \ + .type = (const struct lttng_ust_type_common *) LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_type_sequence, { \ .parent = { \ .type = lttng_ust_type_sequence, \ }, \ @@ -326,10 +326,10 @@ void __event_template_proto___##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args) #undef _ctf_string #define _ctf_string(_item, _src, _nowrite) \ - __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \ + LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \ .struct_size = sizeof(struct lttng_ust_event_field), \ .name = #_item, \ - .type = (const struct lttng_ust_type_common *) __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_type_string, { \ + .type = (const struct lttng_ust_type_common *) LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_type_string, { \ .parent = { \ .type = lttng_ust_type_string, \ }, \ @@ -345,10 +345,10 @@ void __event_template_proto___##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args) #undef _ctf_enum #define _ctf_enum(_provider, _name, _type, _item, _src, _nowrite) \ - __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \ + LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \ .struct_size = sizeof(struct lttng_ust_event_field), \ .name = #_item, \ - .type = (const struct lttng_ust_type_common *) __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_type_enum, { \ + .type = (const struct lttng_ust_type_common *) LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_type_enum, { \ .parent = { \ .type = lttng_ust_type_enum, \ }, \ diff --git a/src/common/events.h b/src/common/events.h index b3e11bb3..bf3367b7 100644 --- a/src/common/events.h +++ b/src/common/events.h @@ -506,7 +506,7 @@ const struct lttng_ust_type_struct *lttng_ust_get_type_struct(const struct lttng } #define lttng_ust_static_type_integer(_size, _alignment, _signedness, _byte_order, _base) \ - ((const struct lttng_ust_type_common *) __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_type_integer, { \ + ((const struct lttng_ust_type_common *) LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_type_integer, { \ .parent = { \ .type = lttng_ust_type_integer, \ }, \ @@ -519,7 +519,7 @@ const struct lttng_ust_type_struct *lttng_ust_get_type_struct(const struct lttng })) #define lttng_ust_static_type_array_text(_length) \ - ((const struct lttng_ust_type_common *) __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_type_array, { \ + ((const struct lttng_ust_type_common *) LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_type_array, { \ .parent = { \ .type = lttng_ust_type_array, \ }, \ @@ -533,7 +533,7 @@ const struct lttng_ust_type_struct *lttng_ust_get_type_struct(const struct lttng })) #define lttng_ust_static_event_field(_name, _type, _nowrite, _nofilter) \ - __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \ + LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \ .struct_size = sizeof(struct lttng_ust_event_field), \ .name = (_name), \ .type = (_type), \ @@ -542,7 +542,7 @@ const struct lttng_ust_type_struct *lttng_ust_get_type_struct(const struct lttng }) #define lttng_ust_static_ctx_field(_event_field, _get_size, _record, _get_value, _destroy, _priv) \ - __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_ctx_field, { \ + LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_ctx_field, { \ .event_field = (_event_field), \ .get_size = (_get_size), \ .record = (_record), \ diff --git a/src/lib/lttng-ust/lttng-ring-buffer-client-template.h b/src/lib/lttng-ust/lttng-ring-buffer-client-template.h index fea1774f..d4d2fdf0 100644 --- a/src/lib/lttng-ust/lttng-ring-buffer-client-template.h +++ b/src/lib/lttng-ust/lttng-ring-buffer-client-template.h @@ -801,7 +801,7 @@ static struct lttng_transport lttng_relay_transport = { .name = "relay-" RING_BUFFER_MODE_TEMPLATE_STRING "-mmap", .ops = { .struct_size = sizeof(struct lttng_ust_channel_buffer_ops), - .priv = __LTTNG_COMPOUND_LITERAL(struct lttng_ust_channel_buffer_ops_private, { + .priv = LTTNG_UST_COMPOUND_LITERAL(struct lttng_ust_channel_buffer_ops_private, { .pub = <tng_relay_transport.ops, .channel_create = _channel_create, .channel_destroy = lttng_channel_destroy, diff --git a/src/lib/lttng-ust/lttng-ring-buffer-metadata-client-template.h b/src/lib/lttng-ust/lttng-ring-buffer-metadata-client-template.h index a2ea1b02..fa9e4636 100644 --- a/src/lib/lttng-ust/lttng-ring-buffer-metadata-client-template.h +++ b/src/lib/lttng-ust/lttng-ring-buffer-metadata-client-template.h @@ -340,7 +340,7 @@ static struct lttng_transport lttng_relay_transport = { .ops = { .struct_size = sizeof(struct lttng_ust_channel_buffer_ops), - .priv = __LTTNG_COMPOUND_LITERAL(struct lttng_ust_channel_buffer_ops_private, { + .priv = LTTNG_UST_COMPOUND_LITERAL(struct lttng_ust_channel_buffer_ops_private, { .pub = <tng_relay_transport.ops, .channel_create = _channel_create, .channel_destroy = lttng_channel_destroy, diff --git a/src/lib/lttng-ust/lttng-ust-dynamic-type.c b/src/lib/lttng-ust/lttng-ust-dynamic-type.c index d98e45ba..f46c3231 100644 --- a/src/lib/lttng-ust/lttng-ust-dynamic-type.c +++ b/src/lib/lttng-ust/lttng-ust-dynamic-type.c @@ -16,7 +16,7 @@ #include "common/dynamic-type.h" #define ctf_enum_value(_string, _value) \ - __LTTNG_COMPOUND_LITERAL(struct lttng_ust_enum_entry, { \ + LTTNG_UST_COMPOUND_LITERAL(struct lttng_ust_enum_entry, { \ .struct_size = sizeof(struct lttng_ust_enum_entry), \ .start = { \ .signedness = lttng_ust_is_signed_type(__typeof__(_value)), \ @@ -53,10 +53,10 @@ static struct lttng_ust_enum_desc dt_enum_desc = { }; const struct lttng_ust_event_field *dt_var_fields[_NR_LTTNG_UST_DYNAMIC_TYPES] = { - [LTTNG_UST_DYNAMIC_TYPE_NONE] = __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { + [LTTNG_UST_DYNAMIC_TYPE_NONE] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { .struct_size = sizeof(struct lttng_ust_event_field), .name = "none", - .type = (struct lttng_ust_type_common *) __LTTNG_COMPOUND_LITERAL(struct lttng_ust_type_struct, { + .type = (struct lttng_ust_type_common *) LTTNG_UST_COMPOUND_LITERAL(struct lttng_ust_type_struct, { .parent = { .type = lttng_ust_type_struct, }, @@ -66,70 +66,70 @@ const struct lttng_ust_event_field *dt_var_fields[_NR_LTTNG_UST_DYNAMIC_TYPES] = }), .nowrite = 0, }), - [LTTNG_UST_DYNAMIC_TYPE_S8] = __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { + [LTTNG_UST_DYNAMIC_TYPE_S8] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { .struct_size = sizeof(struct lttng_ust_event_field), .name = "int8", .type = lttng_ust_type_integer_define(int8_t, BYTE_ORDER, 10), .nowrite = 0, }), - [LTTNG_UST_DYNAMIC_TYPE_S16] = __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { + [LTTNG_UST_DYNAMIC_TYPE_S16] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { .struct_size = sizeof(struct lttng_ust_event_field), .name = "int16", .type = lttng_ust_type_integer_define(int16_t, BYTE_ORDER, 10), .nowrite = 0, }), - [LTTNG_UST_DYNAMIC_TYPE_S32] = __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { + [LTTNG_UST_DYNAMIC_TYPE_S32] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { .struct_size = sizeof(struct lttng_ust_event_field), .name = "int32", .type = lttng_ust_type_integer_define(int32_t, BYTE_ORDER, 10), .nowrite = 0, }), - [LTTNG_UST_DYNAMIC_TYPE_S64] = __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { + [LTTNG_UST_DYNAMIC_TYPE_S64] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { .struct_size = sizeof(struct lttng_ust_event_field), .name = "int64", .type = lttng_ust_type_integer_define(int64_t, BYTE_ORDER, 10), .nowrite = 0, }), - [LTTNG_UST_DYNAMIC_TYPE_U8] = __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { + [LTTNG_UST_DYNAMIC_TYPE_U8] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { .struct_size = sizeof(struct lttng_ust_event_field), .name = "uint8", .type = lttng_ust_type_integer_define(uint8_t, BYTE_ORDER, 10), .nowrite = 0, }), - [LTTNG_UST_DYNAMIC_TYPE_U16] = __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { + [LTTNG_UST_DYNAMIC_TYPE_U16] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { .struct_size = sizeof(struct lttng_ust_event_field), .name = "uint16", .type = lttng_ust_type_integer_define(uint16_t, BYTE_ORDER, 10), .nowrite = 0, }), - [LTTNG_UST_DYNAMIC_TYPE_U32] = __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { + [LTTNG_UST_DYNAMIC_TYPE_U32] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { .struct_size = sizeof(struct lttng_ust_event_field), .name = "uint32", .type = lttng_ust_type_integer_define(uint32_t, BYTE_ORDER, 10), .nowrite = 0, }), - [LTTNG_UST_DYNAMIC_TYPE_U64] = __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { + [LTTNG_UST_DYNAMIC_TYPE_U64] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { .struct_size = sizeof(struct lttng_ust_event_field), .name = "uint64", .type = lttng_ust_type_integer_define(uint64_t, BYTE_ORDER, 10), .nowrite = 0, }), - [LTTNG_UST_DYNAMIC_TYPE_FLOAT] = __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { + [LTTNG_UST_DYNAMIC_TYPE_FLOAT] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { .struct_size = sizeof(struct lttng_ust_event_field), .name = "float", .type = lttng_ust_type_float_define(float), .nowrite = 0, }), - [LTTNG_UST_DYNAMIC_TYPE_DOUBLE] = __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { + [LTTNG_UST_DYNAMIC_TYPE_DOUBLE] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { .struct_size = sizeof(struct lttng_ust_event_field), .name = "double", .type = lttng_ust_type_float_define(double), .nowrite = 0, }), - [LTTNG_UST_DYNAMIC_TYPE_STRING] = __LTTNG_COMPOUND_LITERAL(const struct lttng_ust_event_field, { + [LTTNG_UST_DYNAMIC_TYPE_STRING] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { .struct_size = sizeof(struct lttng_ust_event_field), .name = "string", - .type = (struct lttng_ust_type_common *) __LTTNG_COMPOUND_LITERAL(struct lttng_ust_type_string, { + .type = (struct lttng_ust_type_common *) LTTNG_UST_COMPOUND_LITERAL(struct lttng_ust_type_string, { .parent = { .type = lttng_ust_type_string, }, @@ -143,7 +143,7 @@ const struct lttng_ust_event_field *dt_var_fields[_NR_LTTNG_UST_DYNAMIC_TYPES] = static const struct lttng_ust_event_field dt_enum_field = { .struct_size = sizeof(struct lttng_ust_event_field), .name = NULL, - .type = (struct lttng_ust_type_common *) __LTTNG_COMPOUND_LITERAL(struct lttng_ust_type_enum, { + .type = (struct lttng_ust_type_common *) LTTNG_UST_COMPOUND_LITERAL(struct lttng_ust_type_enum, { .parent = { .type = lttng_ust_type_enum, }, -- 2.34.1