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 ...
This commit is contained in:
96
include/trace/events/alarmtimer.h
Normal file
96
include/trace/events/alarmtimer.h
Normal file
@@ -0,0 +1,96 @@
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM alarmtimer
|
||||
|
||||
#if !defined(_TRACE_ALARMTIMER_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _TRACE_ALARMTIMER_H
|
||||
|
||||
#include <linux/alarmtimer.h>
|
||||
#include <linux/rtc.h>
|
||||
#include <linux/tracepoint.h>
|
||||
|
||||
TRACE_DEFINE_ENUM(ALARM_REALTIME);
|
||||
TRACE_DEFINE_ENUM(ALARM_BOOTTIME);
|
||||
TRACE_DEFINE_ENUM(ALARM_REALTIME_FREEZER);
|
||||
TRACE_DEFINE_ENUM(ALARM_BOOTTIME_FREEZER);
|
||||
|
||||
#define show_alarm_type(type) __print_flags(type, " | ", \
|
||||
{ 1 << ALARM_REALTIME, "REALTIME" }, \
|
||||
{ 1 << ALARM_BOOTTIME, "BOOTTIME" }, \
|
||||
{ 1 << ALARM_REALTIME_FREEZER, "REALTIME Freezer" }, \
|
||||
{ 1 << ALARM_BOOTTIME_FREEZER, "BOOTTIME Freezer" })
|
||||
|
||||
TRACE_EVENT(alarmtimer_suspend,
|
||||
|
||||
TP_PROTO(ktime_t expires, int flag),
|
||||
|
||||
TP_ARGS(expires, flag),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(s64, expires)
|
||||
__field(unsigned char, alarm_type)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->expires = expires.tv64;
|
||||
__entry->alarm_type = flag;
|
||||
),
|
||||
|
||||
TP_printk("alarmtimer type:%s expires:%llu",
|
||||
show_alarm_type((1 << __entry->alarm_type)),
|
||||
__entry->expires
|
||||
)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(alarm_class,
|
||||
|
||||
TP_PROTO(struct alarm *alarm, ktime_t now),
|
||||
|
||||
TP_ARGS(alarm, now),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(void *, alarm)
|
||||
__field(unsigned char, alarm_type)
|
||||
__field(s64, expires)
|
||||
__field(s64, now)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->alarm = alarm;
|
||||
__entry->alarm_type = alarm->type;
|
||||
__entry->expires = alarm->node.expires.tv64;
|
||||
__entry->now = now.tv64;
|
||||
),
|
||||
|
||||
TP_printk("alarmtimer:%p type:%s expires:%llu now:%llu",
|
||||
__entry->alarm,
|
||||
show_alarm_type((1 << __entry->alarm_type)),
|
||||
__entry->expires,
|
||||
__entry->now
|
||||
)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(alarm_class, alarmtimer_fired,
|
||||
|
||||
TP_PROTO(struct alarm *alarm, ktime_t now),
|
||||
|
||||
TP_ARGS(alarm, now)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(alarm_class, alarmtimer_start,
|
||||
|
||||
TP_PROTO(struct alarm *alarm, ktime_t now),
|
||||
|
||||
TP_ARGS(alarm, now)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(alarm_class, alarmtimer_cancel,
|
||||
|
||||
TP_PROTO(struct alarm *alarm, ktime_t now),
|
||||
|
||||
TP_ARGS(alarm, now)
|
||||
);
|
||||
|
||||
#endif /* _TRACE_ALARMTIMER_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
Reference in New Issue
Block a user