From a344f64bd188272ee3d0a6055aaa6a3eabd0669d Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Thu, 15 Jun 2017 13:40:35 -0400 Subject: [PATCH] uprobe: Mark uprobe event as registered Signed-off-by: Francis Deslauriers Signed-off-by: Mathieu Desnoyers --- lttng-events.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lttng-events.c b/lttng-events.c index 636a1891..a3030533 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -743,6 +743,17 @@ struct lttng_event *_lttng_event_create(struct lttng_channel *chan, } break; case LTTNG_KERNEL_UPROBE: + /* + * Needs to be explicitly enabled after creation, since + * we may want to apply filters. + */ + event->enabled = 0; + event->registered = 1; + /* + * Populate lttng_event structure before event + * registration. + */ + smp_wmb(); ret = lttng_uprobes_register(event_param->name, event_param->u.uprobe.path, @@ -815,6 +826,7 @@ void register_event(struct lttng_event *event) desc->name); break; case LTTNG_KERNEL_KPROBE: + case LTTNG_KERNEL_UPROBE: case LTTNG_KERNEL_KRETPROBE: case LTTNG_KERNEL_FUNCTION: case LTTNG_KERNEL_NOOP: -- 2.34.1