X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-events.c;h=742bec4da9418bb856574068922dfa38daf14796;hb=5255eed16b9313c1ee631798a67d60c22fb7ab3f;hp=a3030533d1e62d1c01f4cc8b0db9fed4cffa7425;hpb=a344f64bd188272ee3d0a6055aaa6a3eabd0669d;p=lttng-modules.git diff --git a/lttng-events.c b/lttng-events.c index a3030533..742bec4d 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -76,7 +76,12 @@ int _lttng_field_statedump(struct lttng_session *session, void synchronize_trace(void) { +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0)) + synchronize_rcu(); +#else synchronize_sched(); +#endif + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) #ifdef CONFIG_PREEMPT_RT_FULL synchronize_rcu(); @@ -749,6 +754,7 @@ struct lttng_event *_lttng_event_create(struct lttng_channel *chan, */ event->enabled = 0; event->registered = 1; + /* * Populate lttng_event structure before event * registration. @@ -756,8 +762,7 @@ struct lttng_event *_lttng_event_create(struct lttng_channel *chan, smp_wmb(); ret = lttng_uprobes_register(event_param->name, - event_param->u.uprobe.path, - event_param->u.uprobe.offset, + event_param->u.uprobe.fd, event); if (ret) goto register_error; @@ -1466,6 +1471,18 @@ error_free: return ret; } +int lttng_event_add_callsite(struct lttng_event *event, + struct lttng_kernel_event_callsite __user *callsite) +{ + + switch (event->instrumentation) { + case LTTNG_KERNEL_UPROBE: + return lttng_uprobes_add_callsite(event, callsite); + default: + return -EINVAL; + } +} + int lttng_enabler_attach_context(struct lttng_enabler *enabler, struct lttng_kernel_context *context_param) {