History

Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer updates from Thomas Gleixner: "The time/timekeeping/timer folks deliver with this update: - Fix a reintroduced signed/unsigned issue and cleanup the whole signed/unsigned mess in the timekeeping core so this wont happen accidentaly again. - Add a new trace clock based on boot time - Prevent injection of random sleep times when PM tracing abuses the RTC for storage - Make posix timers configurable for real tiny systems - Add tracepoints for the alarm timer subsystem so timer based suspend wakeups can be instrumented - The usual pile of fixes and updates to core and drivers" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits) timekeeping: Use mul_u64_u32_shr() instead of open coding it timekeeping: Get rid of pointless typecasts timekeeping: Make the conversion call chain consistently unsigned timekeeping_Force_unsigned_clocksource_to_nanoseconds_conversion alarmtimer: Add tracepoints for alarm timers trace: Update documentation for mono, mono_raw and boot clock trace: Add an option for boot clock as trace clock timekeeping: Add a fast and NMI safe boot clock timekeeping/clocksource_cyc2ns: Document intended range limitation timekeeping: Ignore the bogus sleep time if pm_trace is enabled selftests/timers: Fix spelling mistake "Asyncrhonous" -> "Asynchronous" clocksource/drivers/bcm2835_timer: Unmap region obtained by of_iomap clocksource/drivers/arm_arch_timer: Map frame with of_io_request_and_map() arm64: dts: rockchip: Arch counter doesn't tick in system suspend clocksource/drivers/arm_arch_timer: Don't assume clock runs in suspend posix-timers: Make them configurable posix_cpu_timers: Move the add_device_randomness() call to a proper place timer: Move sys_alarm from timer.c to itimer.c ptp_clock: Allow for it to be optional Kconfig: Regenerate *.c_shipped files after previous changes ...

Linus Torvalds committed 9 years ago

Commit 9465d9c2 parents e71c397 c029a2b61 files · +1479 −1041Browse files

Showing the changes to include/trace (1 of 61 files). Show all

Unified · Split

include/trace/events/alarmtimer.h+96−0
@@ -0,0 +1,96 @@
1+#undef TRACE_SYSTEM
2+#define TRACE_SYSTEM alarmtimer
3+
4+#if !defined(_TRACE_ALARMTIMER_H) || defined(TRACE_HEADER_MULTI_READ)
5+#define _TRACE_ALARMTIMER_H
6+
7+#include <linux/alarmtimer.h>
8+#include <linux/rtc.h>
9+#include <linux/tracepoint.h>
10+
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);
15+
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" })
21+
22+TRACE_EVENT(alarmtimer_suspend,
23+
24+ TP_PROTO(ktime_t expires, int flag),
25+
26+ TP_ARGS(expires, flag),
27+
28+ TP_STRUCT__entry(
29+ __field(s64, expires)
30+ __field(unsigned char, alarm_type)
31+ ),
32+
33+ TP_fast_assign(
34+ __entry->expires = expires.tv64;
35+ __entry->alarm_type = flag;
36+ ),
37+
38+ TP_printk("alarmtimer type:%s expires:%llu",
39+ show_alarm_type((1 << __entry->alarm_type)),
40+ __entry->expires
41+ )
42+);
43+
44+DECLARE_EVENT_CLASS(alarm_class,
45+
46+ TP_PROTO(struct alarm *alarm, ktime_t now),
47+
48+ TP_ARGS(alarm, now),
49+
50+ TP_STRUCT__entry(
51+ __field(void *, alarm)
52+ __field(unsigned char, alarm_type)
53+ __field(s64, expires)
54+ __field(s64, now)
55+ ),
56+
57+ TP_fast_assign(
58+ __entry->alarm = alarm;
59+ __entry->alarm_type = alarm->type;
60+ __entry->expires = alarm->node.expires.tv64;
61+ __entry->now = now.tv64;
62+ ),
63+
64+ TP_printk("alarmtimer:%p type:%s expires:%llu now:%llu",
65+ __entry->alarm,
66+ show_alarm_type((1 << __entry->alarm_type)),
67+ __entry->expires,
68+ __entry->now
69+ )
70+);
71+
72+DEFINE_EVENT(alarm_class, alarmtimer_fired,
73+
74+ TP_PROTO(struct alarm *alarm, ktime_t now),
75+
76+ TP_ARGS(alarm, now)
77+);
78+
79+DEFINE_EVENT(alarm_class, alarmtimer_start,
80+
81+ TP_PROTO(struct alarm *alarm, ktime_t now),
82+
83+ TP_ARGS(alarm, now)
84+);
85+
86+DEFINE_EVENT(alarm_class, alarmtimer_cancel,
87+
88+ TP_PROTO(struct alarm *alarm, ktime_t now),
89+
90+ TP_ARGS(alarm, now)
91+);
92+
93+#endif /* _TRACE_ALARMTIMER_H */
94+
95+/* This part must be outside protection */
96+#include <trace/define_trace.h>