From 2456e855354415bfaeb7badaa14e11b3e02c8466 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 25 Dec 2016 11:38:40 +0100 Subject: ktime: Get rid of the union ktime is a union because the initial implementation stored the time in scalar nanoseconds on 64 bit machine and in a endianess optimized timespec variant for 32bit machines. The Y2038 cleanup removed the timespec variant and switched everything to scalar nanoseconds. The union remained, but become completely pointless. Get rid of the union and just keep ktime_t as simple typedef of type s64. The conversion was done with coccinelle and some manual mopping up. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra --- include/trace/events/alarmtimer.h | 6 +++--- include/trace/events/timer.h | 16 +++++++--------- 2 files changed, 10 insertions(+), 12 deletions(-) (limited to 'include/trace') diff --git a/include/trace/events/alarmtimer.h b/include/trace/events/alarmtimer.h index a1c108c16c9c..ae4f358dd8e9 100644 --- a/include/trace/events/alarmtimer.h +++ b/include/trace/events/alarmtimer.h @@ -31,7 +31,7 @@ TRACE_EVENT(alarmtimer_suspend, ), TP_fast_assign( - __entry->expires = expires.tv64; + __entry->expires = expires; __entry->alarm_type = flag; ), @@ -57,8 +57,8 @@ DECLARE_EVENT_CLASS(alarm_class, TP_fast_assign( __entry->alarm = alarm; __entry->alarm_type = alarm->type; - __entry->expires = alarm->node.expires.tv64; - __entry->now = now.tv64; + __entry->expires = alarm->node.expires; + __entry->now = now; ), TP_printk("alarmtimer:%p type:%s expires:%llu now:%llu", diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h index 28c5da6fdfac..1448637616d6 100644 --- a/include/trace/events/timer.h +++ b/include/trace/events/timer.h @@ -177,16 +177,14 @@ TRACE_EVENT(hrtimer_start, TP_fast_assign( __entry->hrtimer = hrtimer; __entry->function = hrtimer->function; - __entry->expires = hrtimer_get_expires(hrtimer).tv64; - __entry->softexpires = hrtimer_get_softexpires(hrtimer).tv64; + __entry->expires = hrtimer_get_expires(hrtimer); + __entry->softexpires = hrtimer_get_softexpires(hrtimer); ), TP_printk("hrtimer=%p function=%pf expires=%llu softexpires=%llu", __entry->hrtimer, __entry->function, - (unsigned long long)ktime_to_ns((ktime_t) { - .tv64 = __entry->expires }), - (unsigned long long)ktime_to_ns((ktime_t) { - .tv64 = __entry->softexpires })) + (unsigned long long) __entry->expires, + (unsigned long long) __entry->softexpires) ); /** @@ -211,13 +209,13 @@ TRACE_EVENT(hrtimer_expire_entry, TP_fast_assign( __entry->hrtimer = hrtimer; - __entry->now = now->tv64; + __entry->now = *now; __entry->function = hrtimer->function; ), TP_printk("hrtimer=%p function=%pf now=%llu", __entry->hrtimer, __entry->function, - (unsigned long long)ktime_to_ns((ktime_t) { .tv64 = __entry->now })) - ); + (unsigned long long) __entry->now) +); DECLARE_EVENT_CLASS(hrtimer_class, -- cgit v1.2.3