[PATCH] trace: introduce TRACE_EVENT_ABI

From: Steven Rostedt
Date: Mon Sep 21 2009 - 14:14:53 EST


Some trace events are suitable to form a stable userspace ABI;
this patch introduces infrastructure to mark them as such,
and marks the first few tracepoints this way

Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
Signed-off-by: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
---
include/linux/tracepoint.h | 4 ++++
include/trace/events/power.h | 6 +++---
include/trace/events/sched.h | 4 ++--
3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
index 63a3f7a..4cb454f 100644
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -280,6 +280,10 @@ static inline void tracepoint_synchronize_unregister(void)
* TRACE_EVENT_FN to perform any (un)registration work.
*/

+#define TRACE_EVENT_ABI(name, proto, args, tstruct, assign, print) \
+ TRACE_EVENT(name, PARAMS(proto), PARAMS(args), \
+ PARAMS(tstruct), PARAMS(assign), PARAMS(print))
+
#define TRACE_EVENT(name, proto, args, struct, assign, print) \
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
#define TRACE_EVENT_FN(name, proto, args, struct, \
diff --git a/include/trace/events/power.h b/include/trace/events/power.h
index ea6d579..7f0e86e 100644
--- a/include/trace/events/power.h
+++ b/include/trace/events/power.h
@@ -18,7 +18,7 @@ enum {



-TRACE_EVENT(power_start,
+TRACE_EVENT_ABI(power_start,

TP_PROTO(unsigned int type, unsigned int state),

@@ -37,7 +37,7 @@ TRACE_EVENT(power_start,
TP_printk("type=%lu state=%lu", (unsigned long)__entry->type, (unsigned long)__entry->state)
);

-TRACE_EVENT(power_end,
+TRACE_EVENT_ABI(power_end,

TP_PROTO(int dummy),

@@ -56,7 +56,7 @@ TRACE_EVENT(power_end,
);


-TRACE_EVENT(power_frequency,
+TRACE_EVENT_ABI(power_frequency,

TP_PROTO(unsigned int type, unsigned int state),

diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index 4069c43..93a3e17 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -83,7 +83,7 @@ TRACE_EVENT(sched_wait_task,
* (NOTE: the 'rq' argument is not used by generic trace events,
* but used by the latency tracer plugin. )
*/
-TRACE_EVENT(sched_wakeup,
+TRACE_EVENT_ABI(sched_wakeup,

TP_PROTO(struct rq *rq, struct task_struct *p, int success),

@@ -149,7 +149,7 @@ TRACE_EVENT(sched_wakeup_new,
* (NOTE: the 'rq' argument is not used by generic trace events,
* but used by the latency tracer plugin. )
*/
-TRACE_EVENT(sched_switch,
+TRACE_EVENT_ABI(sched_switch,

TP_PROTO(struct rq *rq, struct task_struct *prev,
struct task_struct *next),
--
1.6.0.6



--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/