Merge branch 'master' of ssh://git.lttng.org/home/git/lttng-modules
[lttng-modules.git] / probes / lttng-events.h
index 8de92ba5ab4854815ab899d431c011fe347710c0..f97804859c2f8ebffbcd3e98346de102cb90d21d 100644 (file)
@@ -1,3 +1,12 @@
+/*
+ * lttng-events.h
+ *
+ * Copyright (C) 2009 Steven Rostedt <rostedt@goodmis.org>
+ * Copyright (C) 2010-2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * Dual LGPL v2.1/GPL v2 license.
+ */
+
 #include <linux/debugfs.h>
 #include "lttng.h"
 #include "lttng-types.h"
@@ -520,7 +529,11 @@ static void __event_probe__##_name(void *__data, _proto)                 \
                                                                              \
        if (0)                                                                \
                (void) __dynamic_len_idx;       /* don't warn if unused */    \
-       if (!ACCESS_ONCE(__chan->session->active))                            \
+       if (unlikely(!ACCESS_ONCE(__chan->session->active)))                  \
+               return;                                                       \
+       if (unlikely(!ACCESS_ONCE(__chan->enabled)))                          \
+               return;                                                       \
+       if (unlikely(!ACCESS_ONCE(__event->enabled)))                         \
                return;                                                       \
        __event_len = __event_get_size__##_name(__dynamic_len, _args);        \
        __event_align = __event_get_align__##_name(_args);                    \
This page took 0.027452 seconds and 4 git commands to generate.