callsite: move after the call
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 16 Oct 2012 14:28:21 +0000 (10:28 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 16 Oct 2012 14:28:21 +0000 (10:28 -0400)
move after the call so that the address sampled matches, typically, the
return address of the tracepoint callee.

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

index 61d227d5ba2ca1c32e15042d3008d4bc569a0969..8e4704c47f3e264e653b1539f45e30234f4080cf 100644 (file)
 extern "C" {
 #endif
 
-#define tracepoint(provider, name, ...)                                            \
-       do {                                                                \
-               TRACEPOINT_CALLSITE(provider, name);                        \
-               STAP_PROBEV(provider, name, ## __VA_ARGS__);                \
-               if (caa_unlikely(__tracepoint_##provider##___##name.state)) \
-                       __tracepoint_cb_##provider##___##name(__VA_ARGS__); \
+#define tracepoint(provider, name, ...)                                              \
+       do {                                                                  \
+               STAP_PROBEV(provider, name, ## __VA_ARGS__);                  \
+               if (caa_unlikely(__tracepoint_##provider##___##name.state)) { \
+                       __tracepoint_cb_##provider##___##name(__VA_ARGS__);   \
+                       TRACEPOINT_CALLSITE(provider, name);                  \
+               }                                                             \
        } while (0)
 
 #define TP_ARGS(...)       __VA_ARGS__
This page took 0.042557 seconds and 4 git commands to generate.