X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;ds=sidebyside;f=probes%2Flttng-events.h;h=f97804859c2f8ebffbcd3e98346de102cb90d21d;hb=44252f0fd51fd4bf28926dcef525355bceb08c5f;hp=8de92ba5ab4854815ab899d431c011fe347710c0;hpb=41b59694ba5b85708c9b6a68743347388665a5a3;p=lttng-modules.git diff --git a/probes/lttng-events.h b/probes/lttng-events.h index 8de92ba5..f9780485 100644 --- a/probes/lttng-events.h +++ b/probes/lttng-events.h @@ -1,3 +1,12 @@ +/* + * lttng-events.h + * + * Copyright (C) 2009 Steven Rostedt + * Copyright (C) 2010-2011 Mathieu Desnoyers + * + * Dual LGPL v2.1/GPL v2 license. + */ + #include #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); \