Clarify probe registration documentation/errors
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 18 Jun 2013 14:02:00 +0000 (10:02 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 18 Jun 2013 14:02:54 +0000 (10:02 -0400)
Fixes #513

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
doc/man/lttng-ust.3
include/lttng/ust-tracepoint-event.h

index aa52c590380aaff5901f5eef8f6769513d1f23c1..c92d3ca7b17415891fa7706f2824a0d17189895e 100644 (file)
@@ -156,6 +156,11 @@ TRACEPOINT_EVENT(
                ctf_float(double, doublefield, doublearg)
        )
 )
+
+There can be an arbitrary number of tracepoint providers within an
+application, but they must each have their own provider name. Duplicate
+provider names are not allowed.
+
 .fi
 
 .SH "ASSIGNING LOGLEVEL TO EVENTS"
index c7bceef652478d4ba114788867ed98941d34379a..ff682a96fa5e8941357f8dcbc61fd2afcfccda21 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <urcu/compiler.h>
 #include <urcu/rculist.h>
 #include <lttng/ust-events.h>
@@ -684,7 +685,10 @@ _TP_COMBINE_TOKENS(__lttng_events_init__, TRACEPOINT_PROVIDER)(void)
         */
        _TP_COMBINE_TOKENS(__tracepoint_provider_check_, TRACEPOINT_PROVIDER)();
        ret = lttng_probe_register(&_TP_COMBINE_TOKENS(__probe_desc___, TRACEPOINT_PROVIDER));
-       assert(!ret);
+       if (ret) {
+               fprintf(stderr, "LTTng-UST: Error (%d) while registering tracepoint probe. Duplicate registration of tracepoint probes having the same name is not allowed.\n", ret);
+               abort();
+       }
 }
 
 static void lttng_ust_notrace __attribute__((destructor))
This page took 0.026414 seconds and 4 git commands to generate.