diff options
Diffstat (limited to 'include/linux/tracepoint.h')
-rw-r--r-- | include/linux/tracepoint.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index d35a7ee7611f..b9dc4ca0246f 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -31,6 +31,8 @@ struct tracepoint { | |||
31 | * Keep in sync with vmlinux.lds.h. | 31 | * Keep in sync with vmlinux.lds.h. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #ifndef DECLARE_TRACE | ||
35 | |||
34 | #define TP_PROTO(args...) args | 36 | #define TP_PROTO(args...) args |
35 | #define TP_ARGS(args...) args | 37 | #define TP_ARGS(args...) args |
36 | 38 | ||
@@ -114,6 +116,7 @@ static inline void tracepoint_update_probe_range(struct tracepoint *begin, | |||
114 | struct tracepoint *end) | 116 | struct tracepoint *end) |
115 | { } | 117 | { } |
116 | #endif /* CONFIG_TRACEPOINTS */ | 118 | #endif /* CONFIG_TRACEPOINTS */ |
119 | #endif /* DECLARE_TRACE */ | ||
117 | 120 | ||
118 | /* | 121 | /* |
119 | * Connect a probe to a tracepoint. | 122 | * Connect a probe to a tracepoint. |
@@ -154,10 +157,8 @@ static inline void tracepoint_synchronize_unregister(void) | |||
154 | } | 157 | } |
155 | 158 | ||
156 | #define PARAMS(args...) args | 159 | #define PARAMS(args...) args |
157 | #define TRACE_FORMAT(name, proto, args, fmt) \ | ||
158 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) | ||
159 | |||
160 | 160 | ||
161 | #ifndef TRACE_EVENT | ||
161 | /* | 162 | /* |
162 | * For use with the TRACE_EVENT macro: | 163 | * For use with the TRACE_EVENT macro: |
163 | * | 164 | * |
@@ -197,7 +198,7 @@ static inline void tracepoint_synchronize_unregister(void) | |||
197 | * * This is how the trace record is structured and will | 198 | * * This is how the trace record is structured and will |
198 | * * be saved into the ring buffer. These are the fields | 199 | * * be saved into the ring buffer. These are the fields |
199 | * * that will be exposed to user-space in | 200 | * * that will be exposed to user-space in |
200 | * * /debug/tracing/events/<*>/format. | 201 | * * /sys/kernel/debug/tracing/events/<*>/format. |
201 | * * | 202 | * * |
202 | * * The declared 'local variable' is called '__entry' | 203 | * * The declared 'local variable' is called '__entry' |
203 | * * | 204 | * * |
@@ -257,10 +258,11 @@ static inline void tracepoint_synchronize_unregister(void) | |||
257 | * tracepoint callback (this is used by programmatic plugins and | 258 | * tracepoint callback (this is used by programmatic plugins and |
258 | * can also by used by generic instrumentation like SystemTap), and | 259 | * can also by used by generic instrumentation like SystemTap), and |
259 | * it is also used to expose a structured trace record in | 260 | * it is also used to expose a structured trace record in |
260 | * /debug/tracing/events/. | 261 | * /sys/kernel/debug/tracing/events/. |
261 | */ | 262 | */ |
262 | 263 | ||
263 | #define TRACE_EVENT(name, proto, args, struct, assign, print) \ | 264 | #define TRACE_EVENT(name, proto, args, struct, assign, print) \ |
264 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) | 265 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) |
266 | #endif | ||
265 | 267 | ||
266 | #endif | 268 | #endif |