Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934522AbbEMOL7 (ORCPT ); Wed, 13 May 2015 10:11:59 -0400 Received: from smtprelay0139.hostedemail.com ([216.40.44.139]:43372 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934403AbbEMOLx (ORCPT ); Wed, 13 May 2015 10:11:53 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3870:3871:3873:4321:4605:5007:6261:7875:7974:10004:10400:10848:10967:11026:11232:11658:11914:12043:12296:12438:12517:12519:12555:12740:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: sack91_2d53b90e1a840 X-Filterd-Recvd-Size: 3573 Date: Wed, 13 May 2015 10:11:50 -0400 From: Steven Rostedt To: Badhri Jagan Sridharan Cc: Ingo Molnar , Thomas Gleixner , John Stultz , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] tracing: timer: Add deferrable flag to timer_start Message-ID: <20150513101150.24451aae@gandalf.local.home> In-Reply-To: <1431040834-28965-1-git-send-email-Badhri@google.com> References: <1431040834-28965-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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2804 Lines: 89 On Thu, 7 May 2015 16:20:34 -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 Acked-by: Steven Rostedt John, Thomas, you want to pick this up? -- Steve > --- > Changelog since v2: > - changed deferrable flag to unsigned int > > Changelog since v1: > - fixed indentation > - moved deferrable flag checking to tracing code > > 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 2ece3aa..e5588da 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)); > } > > 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/