From: Francis Deslauriers Date: Thu, 15 Jun 2017 17:40:35 +0000 (-0400) Subject: uprobe: Mark uprobe event as registered X-Git-Tag: v2.11.0-rc1~7 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a344f64bd188272ee3d0a6055aaa6a3eabd0669d;p=lttng-modules.git uprobe: Mark uprobe event as registered Signed-off-by: Francis Deslauriers Signed-off-by: Mathieu Desnoyers --- 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: