2 #define TRACE_SYSTEM alarmtimer
4 #if !defined(_TRACE_ALARMTIMER_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_ALARMTIMER_H
7 #include <linux/alarmtimer.h>
9 #include <linux/tracepoint.h>
11 TRACE_DEFINE_ENUM(ALARM_REALTIME
);
12 TRACE_DEFINE_ENUM(ALARM_BOOTTIME
);
13 TRACE_DEFINE_ENUM(ALARM_REALTIME_FREEZER
);
14 TRACE_DEFINE_ENUM(ALARM_BOOTTIME_FREEZER
);
16 #define show_alarm_type(type) __print_flags(type, " | ", \
17 { 1 << ALARM_REALTIME, "REALTIME" }, \
18 { 1 << ALARM_BOOTTIME, "BOOTTIME" }, \
19 { 1 << ALARM_REALTIME_FREEZER, "REALTIME Freezer" }, \
20 { 1 << ALARM_BOOTTIME_FREEZER, "BOOTTIME Freezer" })
22 TRACE_EVENT(alarmtimer_suspend
,
24 TP_PROTO(ktime_t expires
, int flag
),
26 TP_ARGS(expires
, flag
),
30 __field(unsigned char, alarm_type
)
34 __entry
->expires
= expires
;
35 __entry
->alarm_type
= flag
;
38 TP_printk("alarmtimer type:%s expires:%llu",
39 show_alarm_type((1 << __entry
->alarm_type
)),
44 DECLARE_EVENT_CLASS(alarm_class
,
46 TP_PROTO(struct alarm
*alarm
, ktime_t now
),
51 __field(void *, alarm
)
52 __field(unsigned char, alarm_type
)
58 __entry
->alarm
= alarm
;
59 __entry
->alarm_type
= alarm
->type
;
60 __entry
->expires
= alarm
->node
.expires
;
64 TP_printk("alarmtimer:%p type:%s expires:%llu now:%llu",
66 show_alarm_type((1 << __entry
->alarm_type
)),
72 DEFINE_EVENT(alarm_class
, alarmtimer_fired
,
74 TP_PROTO(struct alarm
*alarm
, ktime_t now
),
79 DEFINE_EVENT(alarm_class
, alarmtimer_start
,
81 TP_PROTO(struct alarm
*alarm
, ktime_t now
),
86 DEFINE_EVENT(alarm_class
, alarmtimer_cancel
,
88 TP_PROTO(struct alarm
*alarm
, ktime_t now
),
93 #endif /* _TRACE_ALARMTIMER_H */
95 /* This part must be outside protection */
96 #include <trace/define_trace.h>