summaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorJason Baron <jbaron@redhat.com>2009-02-11 13:57:25 -0500
committerSteven Rostedt <srostedt@redhat.com>2009-02-13 09:06:18 -0500
commitb5f9fd0f8a05c9bafb91a9a85b9110938d8e585b (patch)
tree14e84d393f5dd1235fc6e256564d80e965daf3a7 /include/trace
parent45141d4667d208421ca787a3301542b6a5e0b112 (diff)
downloadlinux-stable-b5f9fd0f8a05c9bafb91a9a85b9110938d8e585b.tar.gz
linux-stable-b5f9fd0f8a05c9bafb91a9a85b9110938d8e585b.tar.bz2
linux-stable-b5f9fd0f8a05c9bafb91a9a85b9110938d8e585b.zip
tracing: convert c/p state power tracer to use tracepoints
Convert the c/p state "power" tracer to use tracepoints. Avoids a function call when the tracer is disabled. Signed-off-by: Jason Baron <jbaron@redhat.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/power.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/include/trace/power.h b/include/trace/power.h
index c7cefbcdaea4..2c733e58e89c 100644
--- a/include/trace/power.h
+++ b/include/trace/power.h
@@ -2,6 +2,7 @@
#define _TRACE_POWER_H
#include <linux/ktime.h>
+#include <linux/tracepoint.h>
enum {
POWER_NONE = 0,
@@ -18,18 +19,16 @@ struct power_trace {
#endif
};
-#ifdef CONFIG_POWER_TRACER
-extern void trace_power_start(struct power_trace *it, unsigned int type,
- unsigned int state);
-extern void trace_power_mark(struct power_trace *it, unsigned int type,
- unsigned int state);
-extern void trace_power_end(struct power_trace *it);
-#else
-static inline void trace_power_start(struct power_trace *it, unsigned int type,
- unsigned int state) { }
-static inline void trace_power_mark(struct power_trace *it, unsigned int type,
- unsigned int state) { }
-static inline void trace_power_end(struct power_trace *it) { }
-#endif
+DECLARE_TRACE(power_start,
+ TPPROTO(struct power_trace *it, unsigned int type, unsigned int state),
+ TPARGS(it, type, state));
+
+DECLARE_TRACE(power_mark,
+ TPPROTO(struct power_trace *it, unsigned int type, unsigned int state),
+ TPARGS(it, type, state));
+
+DECLARE_TRACE(power_end,
+ TPPROTO(struct power_trace *it),
+ TPARGS(it));
#endif /* _TRACE_POWER_H */