X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=probes%2Flttng-ftrace.c;h=1aa71831e86fd4bd21780278bb78d385f79ebc8b;hb=e64957da15e3652322dcf6a5389beb01901de8e6;hp=b8bd344749b201ecec08b6e93ebcba2715fb08f7;hpb=a33e44a60b7128349043753e53affba8ebc40716;p=lttng-modules.git diff --git a/probes/lttng-ftrace.c b/probes/lttng-ftrace.c index b8bd3447..1aa71831 100644 --- a/probes/lttng-ftrace.c +++ b/probes/lttng-ftrace.c @@ -38,8 +38,13 @@ void lttng_ftrace_handler(unsigned long ip, unsigned long parent_ip, void **data } payload; int ret; - 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; + lib_ring_buffer_ctx_init(&ctx, chan->chan, event, sizeof(payload), ltt_alignof(payload), -1); ret = chan->ops->event_reserve(&ctx, event->id);