aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2009-11-26 02:05:38 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-26 03:14:03 -0500
commit7703466b4c0a21b88d701882bef0d45bcb0a0281 (patch)
treeb2d8b0ae1d0af754adf55fe5190104d3708ffdf5 /include/trace/events
parent382ece710bf88b08440b598731361e5a47582b62 (diff)
tracing: Convert some power events to DEFINE_EVENT
Use DECLARE_EVENT_CLASS to remove duplicate code: text data bss dec hex filename 4312 524 12 4848 12f0 kernel/trace/power-traces.o.old 3455 524 8 3987 f93 kernel/trace/power-traces.o Two events are converted: power: power_start, power_frequency No change in functionality. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Arjan van de Ven <arjan@infradead.org> LKML-Reference: <4B0E28C2.1090906@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/trace/events')
-rw-r--r--include/trace/events/power.h36
1 files changed, 15 insertions, 21 deletions
diff --git a/include/trace/events/power.h b/include/trace/events/power.h
index 9bb96e5a2848..c4efe9b8280d 100644
--- a/include/trace/events/power.h
+++ b/include/trace/events/power.h
@@ -16,7 +16,7 @@ enum {
16}; 16};
17#endif 17#endif
18 18
19TRACE_EVENT(power_start, 19DECLARE_EVENT_CLASS(power,
20 20
21 TP_PROTO(unsigned int type, unsigned int state), 21 TP_PROTO(unsigned int type, unsigned int state),
22 22
@@ -35,42 +35,36 @@ TRACE_EVENT(power_start,
35 TP_printk("type=%lu state=%lu", (unsigned long)__entry->type, (unsigned long)__entry->state) 35 TP_printk("type=%lu state=%lu", (unsigned long)__entry->type, (unsigned long)__entry->state)
36); 36);
37 37
38TRACE_EVENT(power_end, 38DEFINE_EVENT(power, power_start,
39
40 TP_PROTO(int dummy),
41 39
42 TP_ARGS(dummy), 40 TP_PROTO(unsigned int type, unsigned int state),
43 41
44 TP_STRUCT__entry( 42 TP_ARGS(type, state)
45 __field( u64, dummy ) 43);
46 ),
47 44
48 TP_fast_assign( 45DEFINE_EVENT(power, power_frequency,
49 __entry->dummy = 0xffff;
50 ),
51 46
52 TP_printk("dummy=%lu", (unsigned long)__entry->dummy) 47 TP_PROTO(unsigned int type, unsigned int state),
53 48
49 TP_ARGS(type, state)
54); 50);
55 51
52TRACE_EVENT(power_end,
56 53
57TRACE_EVENT(power_frequency, 54 TP_PROTO(int dummy),
58
59 TP_PROTO(unsigned int type, unsigned int state),
60 55
61 TP_ARGS(type, state), 56 TP_ARGS(dummy),
62 57
63 TP_STRUCT__entry( 58 TP_STRUCT__entry(
64 __field( u64, type ) 59 __field( u64, dummy )
65 __field( u64, state )
66 ), 60 ),
67 61
68 TP_fast_assign( 62 TP_fast_assign(
69 __entry->type = type; 63 __entry->dummy = 0xffff;
70 __entry->state = state;
71 ), 64 ),
72 65
73 TP_printk("type=%lu state=%lu", (unsigned long)__entry->type, (unsigned long) __entry->state) 66 TP_printk("dummy=%lu", (unsigned long)__entry->dummy)
67
74); 68);
75 69
76#endif /* _TRACE_POWER_H */ 70#endif /* _TRACE_POWER_H */