TRACEPOINT_EVENT: add floating point support
[ust.git] / include / ust / lttng-tracepoint-event.h
index 10b2d23fa57ee14af89517e2627c9242ff2a58bd..c6e71e89c33be199e37763cfce1bde2ecd085e81 100644 (file)
          .type = __type_integer(_type, _byte_order, _base, none),\
        },
 
+#undef ctf_float
+#define ctf_float(_type, _item, _src)                          \
+       {                                                       \
+         .name = #_item,                                       \
+         .type = __type_float(_type),                          \
+       },
+
 #undef ctf_array_encoded
 #define ctf_array_encoded(_type, _item, _src, _length, _encoding) \
        {                                                       \
@@ -234,6 +241,11 @@ static struct lttng_probe_desc TP_ID(__probe_desc___, TRACE_SYSTEM) = {
        __event_len += lib_ring_buffer_align(__event_len, ltt_alignof(_type)); \
        __event_len += sizeof(_type);
 
+#undef ctf_float
+#define ctf_float(_type, _item, _src)                                         \
+       __event_len += lib_ring_buffer_align(__event_len, ltt_alignof(_type)); \
+       __event_len += sizeof(_type);
+
 #undef ctf_array_encoded
 #define ctf_array_encoded(_type, _item, _src, _length)                        \
        __event_len += lib_ring_buffer_align(__event_len, ltt_alignof(_type)); \
@@ -289,6 +301,10 @@ static inline size_t __event_get_size__##_name(size_t *__dynamic_len, _proto) \
 #define ctf_integer_ext(_type, _item, _src, _byte_order, _base)                       \
        __event_align = max_t(size_t, __event_align, ltt_alignof(_type));
 
+#undef ctf_float
+#define ctf_float(_type, _item, _src)                                         \
+       __event_align = max_t(size_t, __event_align, ltt_alignof(_type));
+
 #undef ctf_array_encoded
 #define ctf_array_encoded(_type, _item, _src, _length)                        \
        __event_align = max_t(size_t, __event_align, ltt_alignof(_type));
@@ -342,6 +358,14 @@ static inline size_t __event_get_align__##_name(_proto)                          \
                __chan->ops->event_write(&ctx, &__tmp, sizeof(__tmp));  \
        }
 
+#undef ctf_float
+#define ctf_float(_type, _item, _src)                                  \
+       {                                                               \
+               _type __tmp = (_src);                                   \
+               lib_ring_buffer_align_ctx(&ctx, ltt_alignof(__tmp));    \
+               __chan->ops->event_write(&ctx, &__tmp, sizeof(__tmp));  \
+       }
+
 #undef ctf_array_encoded
 #define ctf_array_encoded(_type, _item, _src, _length)                 \
        lib_ring_buffer_align_ctx(&ctx, ltt_alignof(_type));            \
This page took 0.023074 seconds and 4 git commands to generate.