X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-events.c;h=2b2f4cbf034d46e270102789162d2cb01f48d61b;hb=9a9973ef0f70a4e8edb731584443b005ba763b09;hp=879097b4a8c7af056c0f0ec57dbef4d9376e7c57;hpb=3b731ab1a88c60e0a3a8eeddd225f751e821b1f3;p=lttng-modules.git diff --git a/lttng-events.c b/lttng-events.c index 879097b4..2b2f4cbf 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -31,6 +31,7 @@ #include "wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */ #include "wrapper/random.h" #include "wrapper/tracepoint.h" +#include "lttng-kernel-version.h" #include "lttng-events.h" #include "lttng-tracer.h" #include "lttng-abi-old.h" @@ -60,9 +61,15 @@ void _lttng_metadata_channel_hangup(struct lttng_metadata_stream *stream); void synchronize_trace(void) { synchronize_sched(); +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) +#ifdef CONFIG_PREEMPT_RT_FULL + synchronize_rcu(); +#endif +#else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */ #ifdef CONFIG_PREEMPT_RT synchronize_rcu(); #endif +#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) */ } struct lttng_session *lttng_session_create(void) @@ -459,6 +466,7 @@ struct lttng_event *lttng_event_create(struct lttng_channel *chan, break; default: WARN_ON_ONCE(1); + goto register_error; } ret = _lttng_event_metadata_statedump(chan->session, chan, event); if (ret) @@ -553,6 +561,8 @@ void _lttng_event_destroy(struct lttng_event *event) * sessions_mutex), so we can do racy operations such as looking for * remaining space left in packet and write, since mutual exclusion * protects us from concurrent writes. + * Returns the number of bytes written in the channel, 0 if no data + * was written and a negative value on error. */ int lttng_metadata_output_channel(struct lttng_metadata_stream *stream, struct channel *chan) @@ -1250,3 +1260,6 @@ module_exit(lttng_events_exit); MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers "); MODULE_DESCRIPTION("LTTng Events"); +MODULE_VERSION(__stringify(LTTNG_MODULES_MAJOR_VERSION) "." + __stringify(LTTNG_MODULES_MINOR_VERSION) "." + __stringify(LTTNG_MODULES_PATCHLEVEL_VERSION));