Add enable/disable per event/channel/session (new ABI)
[lttng-modules.git] / probes / lttng-ftrace.c
index b8bd344749b201ecec08b6e93ebcba2715fb08f7..1aa71831e86fd4bd21780278bb78d385f79ebc8b 100644 (file)
@@ -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);
This page took 0.047021 seconds and 4 git commands to generate.