From: Pierre-Marc Fournier Date: Sun, 22 Mar 2009 15:28:49 +0000 (-0400) Subject: add forgotten tp.h and tp.c X-Git-Tag: v0.1~252 X-Git-Url: https://git.liburcu.org/?a=commitdiff_plain;h=6e71f8c9d4f91119a1531be68356ebfd1b8a1969;p=ust.git add forgotten tp.h and tp.c --- diff --git a/hello/tp.c b/hello/tp.c new file mode 100644 index 0000000..2ee7392 --- /dev/null +++ b/hello/tp.c @@ -0,0 +1,17 @@ +#include "tp.h" +#include "marker.h" +#include "usterr.h" + +DEFINE_TRACE(hello_tptest); + +void tptest_probe(int anint) +{ + DBG("in tracepoint probe..."); + trace_mark(ust, tptest, "anint %d", anint); +} + +static void __attribute__((constructor)) init() +{ + DBG("connecting tracepoint..."); + register_trace_hello_tptest(tptest_probe); +} diff --git a/hello/tp.h b/hello/tp.h new file mode 100644 index 0000000..6064283 --- /dev/null +++ b/hello/tp.h @@ -0,0 +1,5 @@ +#include "tracepoint.h" + +DECLARE_TRACE(hello_tptest, + TPPROTO(int anint), + TPARGS(anint));