|
@@ -136,6 +136,20 @@ DEFINE_EVENT(timer_class, timer_cancel,
|
|
|
TP_ARGS(timer)
|
|
|
);
|
|
|
|
|
|
+#define decode_clockid(type) \
|
|
|
+ __print_symbolic(type, \
|
|
|
+ { CLOCK_REALTIME, "CLOCK_REALTIME" }, \
|
|
|
+ { CLOCK_MONOTONIC, "CLOCK_MONOTONIC" }, \
|
|
|
+ { CLOCK_BOOTTIME, "CLOCK_BOOTTIME" }, \
|
|
|
+ { CLOCK_TAI, "CLOCK_TAI" })
|
|
|
+
|
|
|
+#define decode_hrtimer_mode(mode) \
|
|
|
+ __print_symbolic(mode, \
|
|
|
+ { HRTIMER_MODE_ABS, "ABS" }, \
|
|
|
+ { HRTIMER_MODE_REL, "REL" }, \
|
|
|
+ { HRTIMER_MODE_ABS_PINNED, "ABS|PINNED" }, \
|
|
|
+ { HRTIMER_MODE_REL_PINNED, "REL|PINNED" })
|
|
|
+
|
|
|
/**
|
|
|
* hrtimer_init - called when the hrtimer is initialized
|
|
|
* @hrtimer: pointer to struct hrtimer
|
|
@@ -162,10 +176,8 @@ TRACE_EVENT(hrtimer_init,
|
|
|
),
|
|
|
|
|
|
TP_printk("hrtimer=%p clockid=%s mode=%s", __entry->hrtimer,
|
|
|
- __entry->clockid == CLOCK_REALTIME ?
|
|
|
- "CLOCK_REALTIME" : "CLOCK_MONOTONIC",
|
|
|
- __entry->mode == HRTIMER_MODE_ABS ?
|
|
|
- "HRTIMER_MODE_ABS" : "HRTIMER_MODE_REL")
|
|
|
+ decode_clockid(__entry->clockid),
|
|
|
+ decode_hrtimer_mode(__entry->mode))
|
|
|
);
|
|
|
|
|
|
/**
|