Rename __LTTNG_COMPOUND_LITERAL to LTTNG_UST_COMPOUND_LITERAL
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 15 Apr 2021 19:53:03 +0000 (15:53 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 15 Apr 2021 19:53:03 +0000 (15:53 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Id92634444681f187ce6d4b15a64c739e93d243f2

include/lttng/ust-compiler.h
include/lttng/ust-events.h
include/lttng/ust-tracepoint-event.h
src/common/events.h
src/lib/lttng-ust/lttng-ring-buffer-client-template.h
src/lib/lttng-ust/lttng-ring-buffer-metadata-client-template.h
src/lib/lttng-ust/lttng-ust-dynamic-type.c

index 7c858f87fb03bc5ce095797dc768eb32abed0d38..475caa30ea11131e7bfd607ecc6419708d5e0a23 100644 (file)
  * 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
 
 /*
index 95b4698de089bb08440687bbcb226f7ca461bcd2..63a6f1585e7ee940e0e038affda218a7ba2295c0 100644 (file)
@@ -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,                   \
                },                                                      \
index 0a97f0dfcf80815a2df59d6bf3e17ddf99e9ff4f..885093a2db4a7145f01742e9ace15e688dfdd54f 100644 (file)
@@ -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,    \
                        },                                      \
index b3e11bb383d946d97fe5620fe48b26f369408e39..bf3367b7528d58c851e8a520b2edd28de06a38fb 100644 (file)
@@ -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),                                                                    \
index fea1774fb55e191b1d5115ff6115bf105deaeefb..d4d2fdf04d1d2941da1f7249cc7059cdc0a51d03 100644 (file)
@@ -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 = &lttng_relay_transport.ops,
                        .channel_create = _channel_create,
                        .channel_destroy = lttng_channel_destroy,
index a2ea1b02fbc330aa3c036c31fdfbb53b007ea0eb..fa9e463622f317ca0df4ae0d05989601e7ca6d27 100644 (file)
@@ -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 = &lttng_relay_transport.ops,
                        .channel_create = _channel_create,
                        .channel_destroy = lttng_channel_destroy,
index d98e45ba24ca66d745da4d6cf93d37e59775244a..f46c323143deba46ca438468f056d2656d675acc 100644 (file)
@@ -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,
                },
This page took 0.033097 seconds and 4 git commands to generate.