Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755311AbbETRU7 (ORCPT ); Wed, 20 May 2015 13:20:59 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:36806 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755161AbbETRTy (ORCPT ); Wed, 20 May 2015 13:19:54 -0400 From: John Stultz To: LKML Cc: Badhri Jagan Sridharan , Thomas Gleixner , Ingo Molnar , Badhri Jagan Sridharan , John Stultz Subject: [PATCH 4/7] tracing: timer: Add deferrable flag to timer_start Date: Wed, 20 May 2015 10:19:33 -0700 Message-Id: <1432142376-2077-5-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1432142376-2077-1-git-send-email-john.stultz@linaro.org> References: <1432142376-2077-1-git-send-email-john.stultz@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2554 Lines: 80 From: Badhri Jagan Sridharan The timer_start event now shows whether the timer is deferrable in case of a low-res timer. The debug_activate function now includes deferrable flag while calling trace_timer_start event. Cc: Thomas Gleixner Cc: Ingo Molnar Acked-by: Steven Rostedt Signed-off-by: Badhri Jagan Sridharan Signed-off-by: John Stultz --- include/trace/events/timer.h | 13 +++++++++---- kernel/time/timer.c | 3 ++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h index 68c2c20..d7abef1 100644 --- a/include/trace/events/timer.h +++ b/include/trace/events/timer.h @@ -43,15 +43,18 @@ DEFINE_EVENT(timer_class, timer_init, */ TRACE_EVENT(timer_start, - TP_PROTO(struct timer_list *timer, unsigned long expires), + TP_PROTO(struct timer_list *timer, + unsigned long expires, + unsigned int deferrable), - TP_ARGS(timer, expires), + TP_ARGS(timer, expires, deferrable), TP_STRUCT__entry( __field( void *, timer ) __field( void *, function ) __field( unsigned long, expires ) __field( unsigned long, now ) + __field( unsigned int, deferrable ) ), TP_fast_assign( @@ -59,11 +62,13 @@ TRACE_EVENT(timer_start, __entry->function = timer->function; __entry->expires = expires; __entry->now = jiffies; + __entry->deferrable = deferrable; ), - TP_printk("timer=%p function=%pf expires=%lu [timeout=%ld]", + TP_printk("timer=%p function=%pf expires=%lu [timeout=%ld] defer=%c", __entry->timer, __entry->function, __entry->expires, - (long)__entry->expires - __entry->now) + (long)__entry->expires - __entry->now, + __entry->deferrable > 0 ? 'y':'n') ); /** diff --git a/kernel/time/timer.c b/kernel/time/timer.c index d4af7c5..ed75ed5 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -650,7 +650,8 @@ static inline void debug_activate(struct timer_list *timer, unsigned long expires) { debug_timer_activate(timer); - trace_timer_start(timer, expires); + trace_timer_start(timer, expires, + tbase_get_deferrable(timer->base)); } static inline void debug_deactivate(struct timer_list *timer) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/