Namespace 'lttng_alignof' to 'lttng_ust_rb_alignof'
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 26 Mar 2021 17:20:51 +0000 (13:20 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 29 Mar 2021 18:00:26 +0000 (14:00 -0400)
Add the standard prefix and make it clearer this is a macro specific to
the ring buffer and not a generic wrapper over alignof.

Change-Id: If929f9744a98ea6980f4239456a59630bd1fc8e9
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
29 files changed:
include/lttng/ust-events.h
include/lttng/ust-tracepoint-event.h
include/lttng/ust-tracer.h
liblttng-ust-java-agent/jni/common/lttng_ust_context.c
liblttng-ust/lttng-context-cgroup-ns.c
liblttng-ust/lttng-context-cpu-id.c
liblttng-ust/lttng-context-ip.c
liblttng-ust/lttng-context-ipc-ns.c
liblttng-ust/lttng-context-mnt-ns.c
liblttng-ust/lttng-context-net-ns.c
liblttng-ust/lttng-context-perf-counters.c
liblttng-ust/lttng-context-pid-ns.c
liblttng-ust/lttng-context-pthread-id.c
liblttng-ust/lttng-context-time-ns.c
liblttng-ust/lttng-context-user-ns.c
liblttng-ust/lttng-context-uts-ns.c
liblttng-ust/lttng-context-vegid.c
liblttng-ust/lttng-context-veuid.c
liblttng-ust/lttng-context-vgid.c
liblttng-ust/lttng-context-vpid.c
liblttng-ust/lttng-context-vsgid.c
liblttng-ust/lttng-context-vsuid.c
liblttng-ust/lttng-context-vtid.c
liblttng-ust/lttng-context-vuid.c
liblttng-ust/lttng-ring-buffer-client.h
liblttng-ust/lttng-ust-comm.c
liblttng-ust/ust-core.c
liblttng-ust/ust-events-internal.h
tests/compile/test-app-ctx/hello.c

index b687934d67b889fa6ec40e58447aa1c8a94865d6..7090673dc4f6f846916067a23280f61c7711edd7 100644 (file)
@@ -124,7 +124,7 @@ struct lttng_ust_type_integer {
                },                                                      \
                .struct_size = sizeof(struct lttng_ust_type_integer),   \
                .size = sizeof(_type) * CHAR_BIT,                       \
-               .alignment = lttng_alignof(_type) * CHAR_BIT,           \
+               .alignment = lttng_ust_rb_alignof(_type) * CHAR_BIT,    \
                .signedness = lttng_ust_is_signed_type(_type),          \
                .reverse_byte_order = _byte_order != BYTE_ORDER,        \
                .base = _base,                                          \
@@ -157,7 +157,7 @@ struct lttng_ust_type_float {
                .exp_dig = sizeof(_type) * CHAR_BIT                     \
                        - lttng_ust_float_mant_dig(_type),              \
                .mant_dig = lttng_ust_float_mant_dig(_type),            \
-               .alignment = lttng_alignof(_type) * CHAR_BIT,           \
+               .alignment = lttng_ust_rb_alignof(_type) * CHAR_BIT,    \
                .reverse_byte_order = BYTE_ORDER != FLOAT_WORD_ORDER,   \
        }))
 
index 48a244883bdbbf3df70ba01f620a20f5c29833af..77f03985862bc280e510d628fcc70fae8ccec679 100644 (file)
@@ -406,26 +406,26 @@ static void __event_probe__##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args));
 
 #undef _ctf_integer_ext
 #define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite)       \
-       __event_len += lttng_ust_lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \
+       __event_len += lttng_ust_lib_ring_buffer_align(__event_len, lttng_ust_rb_alignof(_type)); \
        __event_len += sizeof(_type);
 
 #undef _ctf_float
 #define _ctf_float(_type, _item, _src, _nowrite)                                \
-       __event_len += lttng_ust_lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \
+       __event_len += lttng_ust_lib_ring_buffer_align(__event_len, lttng_ust_rb_alignof(_type)); \
        __event_len += sizeof(_type);
 
 #undef _ctf_array_encoded
 #define _ctf_array_encoded(_type, _item, _src, _byte_order, _length, _encoding,         \
                        _nowrite, _elem_type_base)                               \
-       __event_len += lttng_ust_lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \
+       __event_len += lttng_ust_lib_ring_buffer_align(__event_len, lttng_ust_rb_alignof(_type)); \
        __event_len += sizeof(_type) * (_length);
 
 #undef _ctf_sequence_encoded
 #define _ctf_sequence_encoded(_type, _item, _src, _byte_order, _length_type,    \
                        _src_length, _encoding, _nowrite, _elem_type_base)       \
-       __event_len += lttng_ust_lib_ring_buffer_align(__event_len, lttng_alignof(_length_type));   \
+       __event_len += lttng_ust_lib_ring_buffer_align(__event_len, lttng_ust_rb_alignof(_length_type));   \
        __event_len += sizeof(_length_type);                                   \
-       __event_len += lttng_ust_lib_ring_buffer_align(__event_len, lttng_alignof(_type)); \
+       __event_len += lttng_ust_lib_ring_buffer_align(__event_len, lttng_ust_rb_alignof(_type)); \
        __dynamic_len[__dynamic_len_idx] = (_src_length);                      \
        __event_len += sizeof(_type) * __dynamic_len[__dynamic_len_idx];       \
        __dynamic_len_idx++;
@@ -628,22 +628,22 @@ void __event_prepare_interpreter_stack__##_provider##___##_name(char *__stack_da
 
 #undef _ctf_integer_ext
 #define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite)     \
-       __event_align = _tp_max_t(size_t, __event_align, lttng_alignof(_type));
+       __event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
 
 #undef _ctf_float
 #define _ctf_float(_type, _item, _src, _nowrite)                              \
-       __event_align = _tp_max_t(size_t, __event_align, lttng_alignof(_type));
+       __event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
 
 #undef _ctf_array_encoded
 #define _ctf_array_encoded(_type, _item, _src, _byte_order, _length,          \
                        _encoding, _nowrite, _elem_type_base)                  \
-       __event_align = _tp_max_t(size_t, __event_align, lttng_alignof(_type));
+       __event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
 
 #undef _ctf_sequence_encoded
 #define _ctf_sequence_encoded(_type, _item, _src, _byte_order, _length_type,   \
                        _src_length, _encoding, _nowrite, _elem_type_base)     \
-       __event_align = _tp_max_t(size_t, __event_align, lttng_alignof(_length_type));    \
-       __event_align = _tp_max_t(size_t, __event_align, lttng_alignof(_type));
+       __event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_length_type));     \
+       __event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
 
 #undef _ctf_string
 #define _ctf_string(_item, _src, _nowrite)
@@ -688,7 +688,7 @@ size_t __event_get_align__##_provider##___##_name(_TP_ARGS_PROTO(_args))      \
 #define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite) \
        {                                                               \
                _type __tmp = (_src);                                   \
-               lttng_ust_lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(__tmp));\
+               lttng_ust_lib_ring_buffer_align_ctx(&__ctx, lttng_ust_rb_alignof(__tmp));\
                __chan->ops->event_write(&__ctx, &__tmp, sizeof(__tmp));\
        }
 
@@ -696,14 +696,14 @@ size_t __event_get_align__##_provider##___##_name(_TP_ARGS_PROTO(_args))      \
 #define _ctf_float(_type, _item, _src, _nowrite)                       \
        {                                                               \
                _type __tmp = (_src);                                   \
-               lttng_ust_lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(__tmp));\
+               lttng_ust_lib_ring_buffer_align_ctx(&__ctx, lttng_ust_rb_alignof(__tmp));\
                __chan->ops->event_write(&__ctx, &__tmp, sizeof(__tmp));\
        }
 
 #undef _ctf_array_encoded
 #define _ctf_array_encoded(_type, _item, _src, _byte_order, _length,   \
                        _encoding, _nowrite, _elem_type_base)           \
-       lttng_ust_lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_type));      \
+       lttng_ust_lib_ring_buffer_align_ctx(&__ctx, lttng_ust_rb_alignof(_type));       \
        if (lttng_ust_string_encoding_##_encoding == lttng_ust_string_encoding_none) \
                __chan->ops->event_write(&__ctx, _src, sizeof(_type) * (_length)); \
        else                                                            \
@@ -714,10 +714,10 @@ size_t __event_get_align__##_provider##___##_name(_TP_ARGS_PROTO(_args))      \
                        _src_length, _encoding, _nowrite, _elem_type_base) \
        {                                                               \
                _length_type __tmpl = __stackvar.__dynamic_len[__dynamic_len_idx]; \
-               lttng_ust_lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_length_type));\
+               lttng_ust_lib_ring_buffer_align_ctx(&__ctx, lttng_ust_rb_alignof(_length_type));\
                __chan->ops->event_write(&__ctx, &__tmpl, sizeof(_length_type));\
        }                                                               \
-       lttng_ust_lib_ring_buffer_align_ctx(&__ctx, lttng_alignof(_type));      \
+       lttng_ust_lib_ring_buffer_align_ctx(&__ctx, lttng_ust_rb_alignof(_type));       \
        if (lttng_ust_string_encoding_##_encoding == lttng_ust_string_encoding_none) \
                __chan->ops->event_write(&__ctx, _src,                  \
                        sizeof(_type) * __get_dynamic_len(dest));       \
@@ -730,7 +730,7 @@ size_t __event_get_align__##_provider##___##_name(_TP_ARGS_PROTO(_args))      \
                const char *__ctf_tmp_string =                                  \
                        ((_src) ? (_src) : __LTTNG_UST_NULL_STRING);            \
                lttng_ust_lib_ring_buffer_align_ctx(&__ctx,                             \
-                       lttng_alignof(*__ctf_tmp_string));                      \
+                       lttng_ust_rb_alignof(*__ctf_tmp_string));                       \
                __chan->ops->event_strcpy(&__ctx, __ctf_tmp_string,             \
                        __get_dynamic_len(dest));                               \
        }
index 4b12be184481cc5501622e2bbc97f2cf4a31a8c4..cc5f93e4f7bb31cd6ee9a08f4c874d3ac73af80b 100644 (file)
@@ -24,9 +24,9 @@
 #endif
 
 #ifdef LTTNG_UST_RING_BUFFER_NATURAL_ALIGN
-#define lttng_alignof(type)    __alignof__(type)
+#define lttng_ust_rb_alignof(type)     __alignof__(type)
 #else
-#define lttng_alignof(type)    1
+#define lttng_ust_rb_alignof(type)     1
 #endif
 
 /*
index 43d396d7dda17921f7e90e812838df855db2bf57..20fc113e3f7e0091ee80da31630a76d2dfbc5e7e 100644 (file)
@@ -81,7 +81,7 @@ static size_t get_size_cb(struct lttng_ust_ctx_field *field, size_t offset)
        enum lttng_ust_jni_type jni_type;
 
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(char));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(char));
        size += sizeof(char);           /* tag */
        jctx = lookup_ctx_by_name(ctx_name);
        if (!jctx) {
@@ -93,28 +93,28 @@ static size_t get_size_cb(struct lttng_ust_ctx_field *field, size_t offset)
        case JNI_TYPE_NULL:
                break;
        case JNI_TYPE_INTEGER:
-               size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(int32_t));
+               size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(int32_t));
                size += sizeof(int32_t);        /* variant */
                break;
        case JNI_TYPE_LONG:
-               size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(int64_t));
+               size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(int64_t));
                size += sizeof(int64_t);        /* variant */
                break;
        case JNI_TYPE_DOUBLE:
-               size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(double));
+               size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(double));
                size += sizeof(double);         /* variant */
                break;
        case JNI_TYPE_FLOAT:
-               size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(float));
+               size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(float));
                size += sizeof(float);          /* variant */
                break;
        case JNI_TYPE_SHORT:
-               size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(int16_t));
+               size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(int16_t));
                size += sizeof(int16_t);        /* variant */
                break;
        case JNI_TYPE_BYTE:             /* Fall-through. */
        case JNI_TYPE_BOOLEAN:
-               size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(char));
+               size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(char));
                size += sizeof(char);           /* variant */
                break;
        case JNI_TYPE_STRING:
@@ -154,7 +154,7 @@ static void record_cb(struct lttng_ust_ctx_field *field,
        switch (jni_type) {
        case JNI_TYPE_NULL:
                sel_char = LTTNG_UST_DYNAMIC_TYPE_NONE;
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(char));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(char));
                lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char));
                break;
        case JNI_TYPE_INTEGER:
@@ -162,9 +162,9 @@ static void record_cb(struct lttng_ust_ctx_field *field,
                int32_t v = jctx->value._integer;
 
                sel_char = LTTNG_UST_DYNAMIC_TYPE_S32;
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(char));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(char));
                lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char));
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(v));
                lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
                break;
        }
@@ -173,9 +173,9 @@ static void record_cb(struct lttng_ust_ctx_field *field,
                int64_t v = jctx->value._long;
 
                sel_char = LTTNG_UST_DYNAMIC_TYPE_S64;
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(char));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(char));
                lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char));
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(v));
                lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
                break;
        }
@@ -184,9 +184,9 @@ static void record_cb(struct lttng_ust_ctx_field *field,
                double v = jctx->value._double;
 
                sel_char = LTTNG_UST_DYNAMIC_TYPE_DOUBLE;
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(char));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(char));
                lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char));
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(v));
                lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
                break;
        }
@@ -195,9 +195,9 @@ static void record_cb(struct lttng_ust_ctx_field *field,
                float v = jctx->value._float;
 
                sel_char = LTTNG_UST_DYNAMIC_TYPE_FLOAT;
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(char));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(char));
                lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char));
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(v));
                lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
                break;
        }
@@ -206,9 +206,9 @@ static void record_cb(struct lttng_ust_ctx_field *field,
                int16_t v = jctx->value._short;
 
                sel_char = LTTNG_UST_DYNAMIC_TYPE_S16;
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(char));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(char));
                lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char));
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(v));
                lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
                break;
        }
@@ -217,9 +217,9 @@ static void record_cb(struct lttng_ust_ctx_field *field,
                char v = jctx->value._byte;
 
                sel_char = LTTNG_UST_DYNAMIC_TYPE_S8;
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(char));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(char));
                lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char));
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(v));
                lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
                break;
        }
@@ -228,9 +228,9 @@ static void record_cb(struct lttng_ust_ctx_field *field,
                char v = jctx->value._boolean;
 
                sel_char = LTTNG_UST_DYNAMIC_TYPE_S8;
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(char));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(char));
                lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char));
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(v));
                lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
                break;
        }
@@ -244,7 +244,7 @@ static void record_cb(struct lttng_ust_ctx_field *field,
                        } else {
                                sel_char = LTTNG_UST_DYNAMIC_TYPE_NONE;
                        }
-                       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(char));
+                       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(char));
                        lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char));
                        if (str) {
                                lttng_chan_buf->ops->event_write(ctx, str, strlen(str) + 1);
index 31de1cd2b24f00daebe278ee823db9050a001001..8ac91c4fbbe823a121d769f46587c066fc31f0f6 100644 (file)
@@ -95,7 +95,7 @@ size_t cgroup_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(ino_t));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(ino_t));
        size += sizeof(ino_t);
        return size;
 }
@@ -108,7 +108,7 @@ void cgroup_ns_record(struct lttng_ust_ctx_field *field,
        ino_t cgroup_ns;
 
        cgroup_ns = get_cgroup_ns();
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(cgroup_ns));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(cgroup_ns));
        chan->ops->event_write(ctx, &cgroup_ns, sizeof(cgroup_ns));
 }
 
@@ -126,7 +126,7 @@ int lttng_add_cgroup_ns_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(ino_t) * CHAR_BIT,
-                       lttng_alignof(ino_t) * CHAR_BIT,
+                       lttng_ust_rb_alignof(ino_t) * CHAR_BIT,
                        lttng_ust_is_signed_type(ino_t),
                        BYTE_ORDER, 10);
        if (!type)
index 40d0cf9f2a6fd2360e26829e746a31567aed6a2f..e518314d46d2842243c0be5467a48b258e489c7f 100644 (file)
@@ -29,7 +29,7 @@ size_t cpu_id_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(int));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(int));
        size += sizeof(int);
        return size;
 }
@@ -42,7 +42,7 @@ void cpu_id_record(struct lttng_ust_ctx_field *field,
        int cpu;
 
        cpu = lttng_ust_get_cpu();
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(cpu));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(cpu));
        chan->ops->event_write(ctx, &cpu, sizeof(cpu));
 }
 
@@ -60,7 +60,7 @@ int lttng_add_cpu_id_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(int) * CHAR_BIT,
-                       lttng_alignof(int) * CHAR_BIT,
+                       lttng_ust_rb_alignof(int) * CHAR_BIT,
                        lttng_ust_is_signed_type(int),
                        BYTE_ORDER, 10);
        if (!type)
index b75c8a0150bb90a064e08027a1e4331d523fd881..29ca29e2ce16e030136cbd39fcf60cc72aa01112 100644 (file)
@@ -22,7 +22,7 @@ size_t ip_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(void *));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(void *));
        size += sizeof(void *);
        return size;
 }
@@ -35,7 +35,7 @@ void ip_record(struct lttng_ust_ctx_field *field,
        void *ip;
 
        ip = ctx->ip;
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(ip));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(ip));
        chan->ops->event_write(ctx, &ip, sizeof(ip));
 }
 
@@ -46,7 +46,7 @@ int lttng_add_ip_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(void *) * CHAR_BIT,
-                       lttng_alignof(void *) * CHAR_BIT,
+                       lttng_ust_rb_alignof(void *) * CHAR_BIT,
                        lttng_ust_is_signed_type(void *),
                        BYTE_ORDER, 16);
        if (!type)
index 4bebb8d883c0a3a7bd7ea524ea389047be9f73fc..9988684fdbf664b28585597b6475f9f55db6ff7f 100644 (file)
@@ -94,7 +94,7 @@ size_t ipc_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(ino_t));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(ino_t));
        size += sizeof(ino_t);
        return size;
 }
@@ -107,7 +107,7 @@ void ipc_ns_record(struct lttng_ust_ctx_field *field,
        ino_t ipc_ns;
 
        ipc_ns = get_ipc_ns();
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(ipc_ns));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(ipc_ns));
        chan->ops->event_write(ctx, &ipc_ns, sizeof(ipc_ns));
 }
 
@@ -125,7 +125,7 @@ int lttng_add_ipc_ns_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(ino_t) * CHAR_BIT,
-                       lttng_alignof(ino_t) * CHAR_BIT,
+                       lttng_ust_rb_alignof(ino_t) * CHAR_BIT,
                        lttng_ust_is_signed_type(ino_t),
                        BYTE_ORDER, 10);
        if (!type)
index 01b3087fbed6dc48af851ed0135b25521eb36fc7..895dfe66cd59b789fe78cd024e412bb22b24f741 100644 (file)
@@ -77,7 +77,7 @@ size_t mnt_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(ino_t));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(ino_t));
        size += sizeof(ino_t);
        return size;
 }
@@ -90,7 +90,7 @@ void mnt_ns_record(struct lttng_ust_ctx_field *field,
        ino_t mnt_ns;
 
        mnt_ns = get_mnt_ns();
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(mnt_ns));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(mnt_ns));
        chan->ops->event_write(ctx, &mnt_ns, sizeof(mnt_ns));
 }
 
@@ -108,7 +108,7 @@ int lttng_add_mnt_ns_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(ino_t) * CHAR_BIT,
-                       lttng_alignof(ino_t) * CHAR_BIT,
+                       lttng_ust_rb_alignof(ino_t) * CHAR_BIT,
                        lttng_ust_is_signed_type(ino_t),
                        BYTE_ORDER, 10);
        if (!type)
index 5b5dbac4ab2920e059587945f8a1a569c46026fb..d1bf7d5a99b4aa7bc8bbbf8ac9eec0ec3bd2dbc5 100644 (file)
@@ -94,7 +94,7 @@ size_t net_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(ino_t));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(ino_t));
        size += sizeof(ino_t);
        return size;
 }
@@ -107,7 +107,7 @@ void net_ns_record(struct lttng_ust_ctx_field *field,
        ino_t net_ns;
 
        net_ns = get_net_ns();
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(net_ns));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(net_ns));
        chan->ops->event_write(ctx, &net_ns, sizeof(net_ns));
 }
 
@@ -125,7 +125,7 @@ int lttng_add_net_ns_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(ino_t) * CHAR_BIT,
-                       lttng_alignof(ino_t) * CHAR_BIT,
+                       lttng_ust_rb_alignof(ino_t) * CHAR_BIT,
                        lttng_ust_is_signed_type(ino_t),
                        BYTE_ORDER, 10);
        if (!type)
index 75f6e66f576785aea09e9839d8a28c0d9290152a..3a00a7fabdb8f9de00e34428de0315c37e710b48 100644 (file)
@@ -162,7 +162,7 @@ size_t perf_counter_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(uint64_t));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(uint64_t));
        size += sizeof(uint64_t);
        return size;
 }
@@ -445,7 +445,7 @@ void perf_counter_record(struct lttng_ust_ctx_field *field,
        uint64_t value;
 
        value = wrapper_perf_counter_read(field);
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(value));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(value));
        chan->ops->event_write(ctx, &value, sizeof(value));
 }
 
@@ -547,7 +547,7 @@ int lttng_add_perf_counter_to_ctx(uint32_t type,
                goto perf_field_alloc_error;
        }
        ust_type = lttng_ust_create_type_integer(sizeof(uint64_t) * CHAR_BIT,
-                       lttng_alignof(uint64_t) * CHAR_BIT,
+                       lttng_ust_rb_alignof(uint64_t) * CHAR_BIT,
                        lttng_ust_is_signed_type(uint64_t),
                        BYTE_ORDER, 10);
        if (!ust_type) {
index a24bfb5079209db10aa8b61b792c124dec3bf908..4bdd95acbea487c49ae8debd4294eaa44312c36a 100644 (file)
@@ -80,7 +80,7 @@ size_t pid_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(ino_t));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(ino_t));
        size += sizeof(ino_t);
        return size;
 }
@@ -93,7 +93,7 @@ void pid_ns_record(struct lttng_ust_ctx_field *field,
        ino_t pid_ns;
 
        pid_ns = get_pid_ns();
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(pid_ns));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(pid_ns));
        chan->ops->event_write(ctx, &pid_ns, sizeof(pid_ns));
 }
 
@@ -111,7 +111,7 @@ int lttng_add_pid_ns_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(ino_t) * CHAR_BIT,
-                       lttng_alignof(ino_t) * CHAR_BIT,
+                       lttng_ust_rb_alignof(ino_t) * CHAR_BIT,
                        lttng_ust_is_signed_type(ino_t),
                        BYTE_ORDER, 10);
        if (!type)
index ba371d7cb0eeaa23afe1a560ca01e52fa1441a47..d26cf90820b2c4a53d6c2627f97316e6e84a3a95 100644 (file)
@@ -21,7 +21,7 @@ size_t pthread_id_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(unsigned long));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(unsigned long));
        size += sizeof(unsigned long);
        return size;
 }
@@ -34,7 +34,7 @@ void pthread_id_record(struct lttng_ust_ctx_field *field,
        unsigned long pthread_id;
 
        pthread_id = (unsigned long) pthread_self();
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(pthread_id));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(pthread_id));
        chan->ops->event_write(ctx, &pthread_id, sizeof(pthread_id));
 }
 
@@ -52,7 +52,7 @@ int lttng_add_pthread_id_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(unsigned long) * CHAR_BIT,
-                       lttng_alignof(unsigned long) * CHAR_BIT,
+                       lttng_ust_rb_alignof(unsigned long) * CHAR_BIT,
                        lttng_ust_is_signed_type(unsigned long),
                        BYTE_ORDER, 10);
        if (!type)
index 83210e3eb96512bdefd9042a9c3ddef16db49217..ef5ae4145b0e2f4cc2a73b89fe0c45fbf6675766 100644 (file)
@@ -93,7 +93,7 @@ size_t time_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(ino_t));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(ino_t));
        size += sizeof(ino_t);
        return size;
 }
@@ -106,7 +106,7 @@ void time_ns_record(struct lttng_ust_ctx_field *field,
        ino_t time_ns;
 
        time_ns = get_time_ns();
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(time_ns));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(time_ns));
        chan->ops->event_write(ctx, &time_ns, sizeof(time_ns));
 }
 
@@ -124,7 +124,7 @@ int lttng_add_time_ns_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(ino_t) * CHAR_BIT,
-                       lttng_alignof(ino_t) * CHAR_BIT,
+                       lttng_ust_rb_alignof(ino_t) * CHAR_BIT,
                        lttng_ust_is_signed_type(ino_t),
                        BYTE_ORDER, 10);
        if (!type)
index f23ffe4755db5067ce224d24497ac86e4851af50..3da97f0b1176990137c4f48ff7b652ee639ac71d 100644 (file)
@@ -77,7 +77,7 @@ size_t user_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(ino_t));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(ino_t));
        size += sizeof(ino_t);
        return size;
 }
@@ -90,7 +90,7 @@ void user_ns_record(struct lttng_ust_ctx_field *field,
        ino_t user_ns;
 
        user_ns = get_user_ns();
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(user_ns));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(user_ns));
        chan->ops->event_write(ctx, &user_ns, sizeof(user_ns));
 }
 
@@ -108,7 +108,7 @@ int lttng_add_user_ns_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(ino_t) * CHAR_BIT,
-                       lttng_alignof(ino_t) * CHAR_BIT,
+                       lttng_ust_rb_alignof(ino_t) * CHAR_BIT,
                        lttng_ust_is_signed_type(ino_t),
                        BYTE_ORDER, 10);
        if (!type)
index 2ce62aaf6b01ef7e297b3c73e0a88ca047526244..a410c26455c1e44865a30dc925b96c68a528fed6 100644 (file)
@@ -95,7 +95,7 @@ size_t uts_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(ino_t));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(ino_t));
        size += sizeof(ino_t);
        return size;
 }
@@ -108,7 +108,7 @@ void uts_ns_record(struct lttng_ust_ctx_field *field,
        ino_t uts_ns;
 
        uts_ns = get_uts_ns();
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(uts_ns));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(uts_ns));
        chan->ops->event_write(ctx, &uts_ns, sizeof(uts_ns));
 }
 
@@ -126,7 +126,7 @@ int lttng_add_uts_ns_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(ino_t) * CHAR_BIT,
-                       lttng_alignof(ino_t) * CHAR_BIT,
+                       lttng_ust_rb_alignof(ino_t) * CHAR_BIT,
                        lttng_ust_is_signed_type(ino_t),
                        BYTE_ORDER, 10);
        if (!type)
index eaa9ab66dc2ff7046602374146cd3328b32a91bf..da8530409e277aade22dfa7abfa28a28d66caab1 100644 (file)
@@ -66,7 +66,7 @@ size_t vegid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(gid_t));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(gid_t));
        size += sizeof(gid_t);
        return size;
 }
@@ -79,7 +79,7 @@ void vegid_record(struct lttng_ust_ctx_field *field,
        gid_t vegid;
 
        vegid = get_vegid();
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(vegid));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(vegid));
        chan->ops->event_write(ctx, &vegid, sizeof(vegid));
 }
 
@@ -97,7 +97,7 @@ int lttng_add_vegid_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(gid_t) * CHAR_BIT,
-                       lttng_alignof(gid_t) * CHAR_BIT,
+                       lttng_ust_rb_alignof(gid_t) * CHAR_BIT,
                        lttng_ust_is_signed_type(gid_t),
                        BYTE_ORDER, 10);
        if (!type)
index 7e877f2339673d17e123813244c7f32b48b38617..db60322dde79ea699aebd9b1a6be0369e9f4021d 100644 (file)
@@ -66,7 +66,7 @@ size_t veuid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(uid_t));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(uid_t));
        size += sizeof(uid_t);
        return size;
 }
@@ -79,7 +79,7 @@ void veuid_record(struct lttng_ust_ctx_field *field,
        uid_t veuid;
 
        veuid = get_veuid();
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(veuid));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(veuid));
        chan->ops->event_write(ctx, &veuid, sizeof(veuid));
 }
 
@@ -97,7 +97,7 @@ int lttng_add_veuid_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(uid_t) * CHAR_BIT,
-                       lttng_alignof(uid_t) * CHAR_BIT,
+                       lttng_ust_rb_alignof(uid_t) * CHAR_BIT,
                        lttng_ust_is_signed_type(uid_t),
                        BYTE_ORDER, 10);
        if (!type)
index cd04e95174a6eb5b89a5905c82a915e119368bb8..ac298ae2cda37bd790a58b29ef827ebc93c628f1 100644 (file)
@@ -66,7 +66,7 @@ size_t vgid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(gid_t));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(gid_t));
        size += sizeof(gid_t);
        return size;
 }
@@ -79,7 +79,7 @@ void vgid_record(struct lttng_ust_ctx_field *field,
        gid_t vgid;
 
        vgid = get_vgid();
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(vgid));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(vgid));
        chan->ops->event_write(ctx, &vgid, sizeof(vgid));
 }
 
@@ -97,7 +97,7 @@ int lttng_add_vgid_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(gid_t) * CHAR_BIT,
-                       lttng_alignof(gid_t) * CHAR_BIT,
+                       lttng_ust_rb_alignof(gid_t) * CHAR_BIT,
                        lttng_ust_is_signed_type(gid_t),
                        BYTE_ORDER, 10);
        if (!type)
index 23f39624536126cca0f91f20213968a795c90ad4..c77468c1dd3df79af65a6c0906690651af9e99ef 100644 (file)
@@ -50,7 +50,7 @@ size_t vpid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(pid_t));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(pid_t));
        size += sizeof(pid_t);
        return size;
 }
@@ -62,7 +62,7 @@ void vpid_record(struct lttng_ust_ctx_field *field,
 {
        pid_t vpid = wrapper_getvpid();
 
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(vpid));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(vpid));
        chan->ops->event_write(ctx, &vpid, sizeof(vpid));
 }
 
@@ -80,7 +80,7 @@ int lttng_add_vpid_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(pid_t) * CHAR_BIT,
-                       lttng_alignof(pid_t) * CHAR_BIT,
+                       lttng_ust_rb_alignof(pid_t) * CHAR_BIT,
                        lttng_ust_is_signed_type(pid_t),
                        BYTE_ORDER, 10);
        if (!type)
index 2557e9ab2a3f888c1ed5f995b4dab5c99d49421f..87e11f85dce5132fbdd41be701fb3dcc30a53273 100644 (file)
@@ -70,7 +70,7 @@ size_t vsgid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(gid_t));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(gid_t));
        size += sizeof(gid_t);
        return size;
 }
@@ -83,7 +83,7 @@ void vsgid_record(struct lttng_ust_ctx_field *field,
        gid_t vsgid;
 
        vsgid = get_vsgid();
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(vsgid));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(vsgid));
        chan->ops->event_write(ctx, &vsgid, sizeof(vsgid));
 }
 
@@ -101,7 +101,7 @@ int lttng_add_vsgid_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(gid_t) * CHAR_BIT,
-                       lttng_alignof(gid_t) * CHAR_BIT,
+                       lttng_ust_rb_alignof(gid_t) * CHAR_BIT,
                        lttng_ust_is_signed_type(gid_t),
                        BYTE_ORDER, 10);
        if (!type)
index 8e08100857058ed8061aeb7ef150ffc5a362fc4a..868720820a49739379f9f65c4652a5f306ac0fb5 100644 (file)
@@ -70,7 +70,7 @@ size_t vsuid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(uid_t));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(uid_t));
        size += sizeof(uid_t);
        return size;
 }
@@ -83,7 +83,7 @@ void vsuid_record(struct lttng_ust_ctx_field *field,
        uid_t vsuid;
 
        vsuid = get_vsuid();
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(vsuid));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(vsuid));
        chan->ops->event_write(ctx, &vsuid, sizeof(vsuid));
 }
 
@@ -101,7 +101,7 @@ int lttng_add_vsuid_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(uid_t) * CHAR_BIT,
-                       lttng_alignof(uid_t) * CHAR_BIT,
+                       lttng_ust_rb_alignof(uid_t) * CHAR_BIT,
                        lttng_ust_is_signed_type(uid_t),
                        BYTE_ORDER, 10);
        if (!type)
index b70824fd13aae963f9a23edb9ec751f94f6302c7..f6dd1c7125bee93e9c5e3b6c552873240cd77c97 100644 (file)
@@ -41,7 +41,7 @@ size_t vtid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(pid_t));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(pid_t));
        size += sizeof(pid_t);
        return size;
 }
@@ -66,7 +66,7 @@ void vtid_record(struct lttng_ust_ctx_field *field,
 {
        pid_t vtid = wrapper_getvtid();
 
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(vtid));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(vtid));
        chan->ops->event_write(ctx, &vtid, sizeof(vtid));
 }
 
@@ -84,7 +84,7 @@ int lttng_add_vtid_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(pid_t) * CHAR_BIT,
-                       lttng_alignof(pid_t) * CHAR_BIT,
+                       lttng_ust_rb_alignof(pid_t) * CHAR_BIT,
                        lttng_ust_is_signed_type(pid_t),
                        BYTE_ORDER, 10);
        if (!type)
index 85f14c5dc3f8e44c0975ea2128403fcdedb61c43..ab3e985600512b46bed655e84adfd757bb90692f 100644 (file)
@@ -66,7 +66,7 @@ size_t vuid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(uid_t));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(uid_t));
        size += sizeof(uid_t);
        return size;
 }
@@ -79,7 +79,7 @@ void vuid_record(struct lttng_ust_ctx_field *field,
        uid_t vuid;
 
        vuid = get_vuid();
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(vuid));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(vuid));
        chan->ops->event_write(ctx, &vuid, sizeof(vuid));
 }
 
@@ -97,7 +97,7 @@ int lttng_add_vuid_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(uid_t) * CHAR_BIT,
-                       lttng_alignof(uid_t) * CHAR_BIT,
+                       lttng_ust_rb_alignof(uid_t) * CHAR_BIT,
                        lttng_ust_is_signed_type(uid_t),
                        BYTE_ORDER, 10);
        if (!type)
index 96302ee7ac185ef02e5a7438954fde550951a7bc..350cf0edd15f19bcf3230e0ad322ab8405064ffb 100644 (file)
@@ -182,7 +182,7 @@ size_t record_header_size(const struct lttng_ust_lib_ring_buffer_config *config,
 
        switch (lttng_chan->priv->header_type) {
        case 1: /* compact */
-               padding = lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(uint32_t));
+               padding = lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(uint32_t));
                offset += padding;
                if (!(ctx->rflags & (RING_BUFFER_RFLAG_FULL_TSC | LTTNG_RFLAG_EXTENDED))) {
                        offset += sizeof(uint32_t);     /* id and timestamp */
@@ -190,24 +190,24 @@ size_t record_header_size(const struct lttng_ust_lib_ring_buffer_config *config,
                        /* Minimum space taken by LTTNG_COMPACT_EVENT_BITS id */
                        offset += (LTTNG_COMPACT_EVENT_BITS + CHAR_BIT - 1) / CHAR_BIT;
                        /* Align extended struct on largest member */
-                       offset += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(uint64_t));
+                       offset += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(uint64_t));
                        offset += sizeof(uint32_t);     /* id */
-                       offset += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(uint64_t));
+                       offset += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(uint64_t));
                        offset += sizeof(uint64_t);     /* timestamp */
                }
                break;
        case 2: /* large */
-               padding = lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(uint16_t));
+               padding = lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(uint16_t));
                offset += padding;
                offset += sizeof(uint16_t);
                if (!(ctx->rflags & (RING_BUFFER_RFLAG_FULL_TSC | LTTNG_RFLAG_EXTENDED))) {
-                       offset += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(uint32_t));
+                       offset += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(uint32_t));
                        offset += sizeof(uint32_t);     /* timestamp */
                } else {
                        /* Align extended struct on largest member */
-                       offset += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(uint64_t));
+                       offset += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(uint64_t));
                        offset += sizeof(uint32_t);     /* id */
-                       offset += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(uint64_t));
+                       offset += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(uint64_t));
                        offset += sizeof(uint64_t);     /* timestamp */
                }
                break;
@@ -274,7 +274,7 @@ void lttng_write_event_header(const struct lttng_ust_lib_ring_buffer_config *con
                uint16_t id = event_id;
 
                lib_ring_buffer_write(config, ctx, &id, sizeof(id));
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(uint32_t));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(uint32_t));
                lib_ring_buffer_write(config, ctx, &timestamp, sizeof(timestamp));
                break;
        }
@@ -324,9 +324,9 @@ void lttng_write_event_header_slow(const struct lttng_ust_lib_ring_buffer_config
                                        31);
                        lib_ring_buffer_write(config, ctx, &id, sizeof(id));
                        /* Align extended struct on largest member */
-                       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(uint64_t));
+                       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(uint64_t));
                        lib_ring_buffer_write(config, ctx, &event_id, sizeof(event_id));
-                       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(uint64_t));
+                       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(uint64_t));
                        lib_ring_buffer_write(config, ctx, &timestamp, sizeof(timestamp));
                }
                break;
@@ -337,7 +337,7 @@ void lttng_write_event_header_slow(const struct lttng_ust_lib_ring_buffer_config
                        uint16_t id = event_id;
 
                        lib_ring_buffer_write(config, ctx, &id, sizeof(id));
-                       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(uint32_t));
+                       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(uint32_t));
                        lib_ring_buffer_write(config, ctx, &timestamp, sizeof(timestamp));
                } else {
                        uint16_t id = 65535;
@@ -345,9 +345,9 @@ void lttng_write_event_header_slow(const struct lttng_ust_lib_ring_buffer_config
 
                        lib_ring_buffer_write(config, ctx, &id, sizeof(id));
                        /* Align extended struct on largest member */
-                       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(uint64_t));
+                       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(uint64_t));
                        lib_ring_buffer_write(config, ctx, &event_id, sizeof(event_id));
-                       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(uint64_t));
+                       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(uint64_t));
                        lib_ring_buffer_write(config, ctx, &timestamp, sizeof(timestamp));
                }
                break;
index be7dc9f1e6b4db4395f1f75ebc5d28567643263e..204db9de37c6ace3f9a99041b27e4dd95fd52698 100644 (file)
@@ -637,11 +637,11 @@ int register_to_sessiond(int socket, enum ustctl_socket_type type)
        return ustcomm_send_reg_msg(socket,
                type,
                CAA_BITS_PER_LONG,
-               lttng_alignof(uint8_t) * CHAR_BIT,
-               lttng_alignof(uint16_t) * CHAR_BIT,
-               lttng_alignof(uint32_t) * CHAR_BIT,
-               lttng_alignof(uint64_t) * CHAR_BIT,
-               lttng_alignof(unsigned long) * CHAR_BIT);
+               lttng_ust_rb_alignof(uint8_t) * CHAR_BIT,
+               lttng_ust_rb_alignof(uint16_t) * CHAR_BIT,
+               lttng_ust_rb_alignof(uint32_t) * CHAR_BIT,
+               lttng_ust_rb_alignof(uint64_t) * CHAR_BIT,
+               lttng_ust_rb_alignof(unsigned long) * CHAR_BIT);
 }
 
 static
index 2e19d664683af8126b54ae50d2fc2148c65d1cec..7bd55aba4a054cded14e7c0655f4098d896c443e 100644 (file)
@@ -109,7 +109,7 @@ size_t lttng_ust_dummy_get_size(struct lttng_ust_ctx_field *field, size_t offset
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(char));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(char));
        size += sizeof(char);           /* tag */
        return size;
 }
@@ -120,7 +120,7 @@ void lttng_ust_dummy_record(struct lttng_ust_ctx_field *field,
 {
        char sel_char = (char) LTTNG_UST_DYNAMIC_TYPE_NONE;
 
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(sel_char));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(sel_char));
        chan->ops->event_write(ctx, &sel_char, sizeof(sel_char));
 }
 
index 8116a71e31e0bacf5b3243fdb424ce4173443be3..af72aa665fd847a3d7d2d53d6cd33c43b6adf61f 100644 (file)
@@ -509,7 +509,7 @@ struct lttng_ust_type_common *lttng_ust_create_type_array_text(unsigned int leng
        array_type->alignment = 0;
        array_type->encoding = lttng_ust_string_encoding_UTF8;
        array_type->elem_type = lttng_ust_create_type_integer(sizeof(char) * CHAR_BIT,
-                       lttng_alignof(char) * CHAR_BIT, lttng_ust_is_signed_type(char),
+                       lttng_ust_rb_alignof(char) * CHAR_BIT, lttng_ust_is_signed_type(char),
                        BYTE_ORDER, 10);
        if (!array_type->elem_type)
                goto error_elem;
index 457dc2e1152e47c7fb8722c5a7b80ebce8c269a7..d1cbca4c35a280dae29a61e68adcf44261afa263 100644 (file)
@@ -46,49 +46,49 @@ size_t test_get_size(struct lttng_ust_ctx_field *field, size_t offset)
        int sel = test_count % _NR_LTTNG_UST_DYNAMIC_TYPES;
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(char));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(char));
        size += sizeof(char);           /* tag */
        switch (sel) {
        case LTTNG_UST_DYNAMIC_TYPE_NONE:
                break;
        case LTTNG_UST_DYNAMIC_TYPE_S8:
-               size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(int8_t));
+               size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(int8_t));
                size += sizeof(int8_t);         /* variant */
                break;
        case LTTNG_UST_DYNAMIC_TYPE_S16:
-               size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(int16_t));
+               size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(int16_t));
                size += sizeof(int16_t);        /* variant */
                break;
        case LTTNG_UST_DYNAMIC_TYPE_S32:
-               size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(int32_t));
+               size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(int32_t));
                size += sizeof(int32_t);        /* variant */
                break;
        case LTTNG_UST_DYNAMIC_TYPE_S64:
-               size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(int64_t));
+               size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(int64_t));
                size += sizeof(int64_t);        /* variant */
                break;
        case LTTNG_UST_DYNAMIC_TYPE_U8:
-               size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(uint8_t));
+               size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(uint8_t));
                size += sizeof(uint8_t);                /* variant */
                break;
        case LTTNG_UST_DYNAMIC_TYPE_U16:
-               size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(uint16_t));
+               size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(uint16_t));
                size += sizeof(uint16_t);       /* variant */
                break;
        case LTTNG_UST_DYNAMIC_TYPE_U32:
-               size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(uint32_t));
+               size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(uint32_t));
                size += sizeof(uint32_t);       /* variant */
                break;
        case LTTNG_UST_DYNAMIC_TYPE_U64:
-               size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(uint64_t));
+               size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(uint64_t));
                size += sizeof(uint64_t);       /* variant */
                break;
        case LTTNG_UST_DYNAMIC_TYPE_FLOAT:
-               size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(float));
+               size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(float));
                size += sizeof(float);          /* variant */
                break;
        case LTTNG_UST_DYNAMIC_TYPE_DOUBLE:
-               size += lttng_ust_lib_ring_buffer_align(offset, lttng_alignof(double));
+               size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(double));
                size += sizeof(double);         /* variant */
                break;
        case LTTNG_UST_DYNAMIC_TYPE_STRING:
@@ -109,7 +109,7 @@ void test_record(struct lttng_ust_ctx_field *field,
        int sel = test_count % _NR_LTTNG_UST_DYNAMIC_TYPES;
        char sel_char = (char) sel;
 
-       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(char));
+       lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(char));
        lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char));
        switch (sel) {
        case LTTNG_UST_DYNAMIC_TYPE_NONE:
@@ -118,7 +118,7 @@ void test_record(struct lttng_ust_ctx_field *field,
        {
                int8_t v = -8;
 
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(v));
                lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
                break;
        }
@@ -126,7 +126,7 @@ void test_record(struct lttng_ust_ctx_field *field,
        {
                int16_t v = -16;
 
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(v));
                lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
                break;
        }
@@ -134,7 +134,7 @@ void test_record(struct lttng_ust_ctx_field *field,
        {
                int32_t v = -32;
 
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(v));
                lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
                break;
        }
@@ -142,7 +142,7 @@ void test_record(struct lttng_ust_ctx_field *field,
        {
                int64_t v = -64;
 
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(v));
                lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
                break;
        }
@@ -150,7 +150,7 @@ void test_record(struct lttng_ust_ctx_field *field,
        {
                uint8_t v = 8;
 
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(v));
                lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
                break;
        }
@@ -158,7 +158,7 @@ void test_record(struct lttng_ust_ctx_field *field,
        {
                uint16_t v = 16;
 
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(v));
                lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
                break;
        }
@@ -166,7 +166,7 @@ void test_record(struct lttng_ust_ctx_field *field,
        {
                uint32_t v = 32;
 
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(v));
                lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
                break;
        }
@@ -174,7 +174,7 @@ void test_record(struct lttng_ust_ctx_field *field,
        {
                uint64_t v = 64;
 
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(v));
                lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
                break;
        }
@@ -182,7 +182,7 @@ void test_record(struct lttng_ust_ctx_field *field,
        {
                float f = 22322.0;
 
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(f));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(f));
                lttng_chan_buf->ops->event_write(ctx, &f, sizeof(f));
                break;
        }
@@ -190,7 +190,7 @@ void test_record(struct lttng_ust_ctx_field *field,
        {
                double d = 2.0;
 
-               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_alignof(d));
+               lttng_ust_lib_ring_buffer_align_ctx(ctx, lttng_ust_rb_alignof(d));
                lttng_chan_buf->ops->event_write(ctx, &d, sizeof(d));
                break;
        }
This page took 0.050944 seconds and 4 git commands to generate.