TRACEPOINT_EVENT: No need to calculate size/alignment for no args
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 16 Sep 2011 23:56:41 +0000 (19:56 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 16 Sep 2011 23:56:41 +0000 (19:56 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/ust/lttng-tracepoint-event.h

index 1642cf180c1356424a6aab8771b899574abfd77a..ab9c25252d08afdf105e1a51b07bcc1ad7902a0b 100644 (file)
@@ -318,19 +318,6 @@ static inline size_t __event_get_size__##_name(size_t *__dynamic_len, _proto) \
        return __event_len;                                                   \
 }
 
-#undef TRACEPOINT_EVENT_CLASS_NOARGS
-#define TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields)                        \
-static inline size_t __event_get_size__##_name(size_t *__dynamic_len)        \
-{                                                                            \
-       size_t __event_len = 0;                                               \
-       unsigned int __dynamic_len_idx = 0;                                   \
-                                                                             \
-       if (0)                                                                \
-               (void) __dynamic_len_idx;       /* don't warn if unused */    \
-       _fields                                                               \
-       return __event_len;                                                   \
-}
-
 #include TRACEPOINT_INCLUDE(TRACEPOINT_INCLUDE_FILE)
 
 /*
@@ -380,15 +367,6 @@ static inline size_t __event_get_align__##_name(_proto)                          \
        return __event_align;                                                 \
 }
 
-#undef TRACEPOINT_EVENT_CLASS_NOARGS
-#define TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields)                        \
-static inline size_t __event_get_align__##_name(void)                        \
-{                                                                            \
-       size_t __event_align = 1;                                             \
-       _fields                                                               \
-       return __event_align;                                                 \
-}
-
 #include TRACEPOINT_INCLUDE(TRACEPOINT_INCLUDE_FILE)
 
 
@@ -496,20 +474,16 @@ static void __event_probe__##_name(void *__data)                        \
        struct ltt_channel *__chan = __event->chan;                           \
        struct lib_ring_buffer_ctx ctx;                                       \
        size_t __event_len, __event_align;                                    \
-       size_t __dynamic_len_idx = 0;                                         \
-       size_t __dynamic_len[_TP_ARRAY_SIZE(__event_fields___##_name)];       \
        int __ret;                                                            \
                                                                              \
-       if (0)                                                                \
-               (void) __dynamic_len_idx;       /* don't warn if unused */    \
        if (unlikely(!CMM_ACCESS_ONCE(__chan->session->active)))              \
                return;                                                       \
        if (unlikely(!CMM_ACCESS_ONCE(__chan->enabled)))                      \
                return;                                                       \
        if (unlikely(!CMM_ACCESS_ONCE(__event->enabled)))                     \
                return;                                                       \
-       __event_len = __event_get_size__##_name(__dynamic_len);               \
-       __event_align = __event_get_align__##_name();                         \
+       __event_len = 0;                                                      \
+       __event_align = 1;                                                    \
        lib_ring_buffer_ctx_init(&ctx, __chan->chan, __event, __event_len,    \
                                 __event_align, -1, __chan->handle);          \
        __ret = __chan->ops->event_reserve(&ctx, __event->id);                \
This page took 0.025399 seconds and 4 git commands to generate.