X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=probes%2Flttng-ftrace.c;h=1aa71831e86fd4bd21780278bb78d385f79ebc8b;hb=2001023e1ab9ae4bf85cad1dfb4c9aefb2e40dcf;hp=b8bd344749b201ecec08b6e93ebcba2715fb08f7;hpb=4133fce7c3dfbe61a954001c87931e9785453981;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);