Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756023AbbEFBvD (ORCPT ); Tue, 5 May 2015 21:51:03 -0400 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.232]:28621 "EHLO cdptpa-oedge-vip.email.rr.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750973AbbEFBu7 (ORCPT ); Tue, 5 May 2015 21:50:59 -0400 Date: Tue, 5 May 2015 21:50:59 -0400 From: Steven Rostedt To: Badhri Jagan Sridharan Cc: Ingo Molnar , Thomas Gleixner , John Stultz , linux-kernel@vger.kernel.org Subject: Re: [PATCH] tracing: timer: Add deferrable flag to timer_start Message-ID: <20150505215059.34947afe@grimm.local.home> In-Reply-To: <1430874293-3849-1-git-send-email-Badhri@google.com> References: <1430874293-3849-1-git-send-email-Badhri@google.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-RR-Connecting-IP: 107.14.168.130:25 X-Cloudmark-Score: 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2777 Lines: 91 On Tue, 5 May 2015 18:04:53 -0700 Badhri Jagan Sridharan wrote: > 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. > > Signed-off-by: Badhri Jagan Sridharan > --- > include/trace/events/timer.h | 11 +++++++---- > kernel/time/timer.c | 3 ++- > 2 files changed, 9 insertions(+), 5 deletions(-) > > diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h > index 68c2c20..9b15f89 100644 > --- a/include/trace/events/timer.h > +++ b/include/trace/events/timer.h > @@ -43,15 +43,17 @@ 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, char 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(char, deferrable) Fix indentation here too. > ), > > TP_fast_assign( > @@ -59,11 +61,12 @@ 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) Should pass in tbase_get_deferrable(), and do the characters here (slight optimization). __entry->deferrable > 0 ? 'y' : 'n') > ); > > /** > diff --git a/kernel/time/timer.c b/kernel/time/timer.c > index 2ece3aa..2b906b5 100644 > --- a/kernel/time/timer.c > +++ b/kernel/time/timer.c > @@ -648,7 +648,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) > 0 ? 'y' : 'n'); Then this should just be; trace_timer_start(timer, expires, tbase_get_deferrable(timer->base)); -- Steve > } > > static inline void debug_deactivate(struct timer_list *timer) -- 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/