aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-12-12 22:56:15 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-12 22:56:15 -0500
commit9465d9cc31fa732089cd8bec9f1bdfcdc174a5ce (patch)
treefb31a0a6271b255ffe6e29b4f9eb4192253f8c7f /include/trace
parente71c3978d6f97659f6c3ee942c3e581299e4adf2 (diff)
parentc029a2bec66e42e57538cb65e28618baf6a4b311 (diff)
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 ...
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/alarmtimer.h96
1 files changed, 96 insertions, 0 deletions
diff --git a/include/trace/events/alarmtimer.h b/include/trace/events/alarmtimer.h
new file mode 100644
index 000000000000..a1c108c16c9c
--- /dev/null
+++ b/include/trace/events/alarmtimer.h
@@ -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
11TRACE_DEFINE_ENUM(ALARM_REALTIME);
12TRACE_DEFINE_ENUM(ALARM_BOOTTIME);
13TRACE_DEFINE_ENUM(ALARM_REALTIME_FREEZER);
14TRACE_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
22TRACE_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
44DECLARE_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
72DEFINE_EVENT(alarm_class, alarmtimer_fired,
73
74 TP_PROTO(struct alarm *alarm, ktime_t now),
75
76 TP_ARGS(alarm, now)
77);
78
79DEFINE_EVENT(alarm_class, alarmtimer_start,
80
81 TP_PROTO(struct alarm *alarm, ktime_t now),
82
83 TP_ARGS(alarm, now)
84);
85
86DEFINE_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>