From patchwork Wed May 20 17:19:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 48814 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 49D2E21411 for ; Wed, 20 May 2015 17:20:05 +0000 (UTC) Received: by wiz9 with SMTP id 9sf22875352wiz.3 for ; Wed, 20 May 2015 10:20:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=HKcx99UVjLz+jA1MtCGBS9hRUqyYt206sAwYhPylLjw=; b=JggxhMqesKewn0TZBeD1oJwLkH3hQebxMte/VdQPfEricvdUf/EFN9013CzReluI9q lHkg5xUZCyqzzXn7eqnden+HJS4sALObuL1Fr+WtZkehjBQjEB3KpS0+RPTxmsus9tLO H8eoT2EIjKVA4OF9+sA1Xl3OeVbebp0wjA4sFq8oBvUwat4GlOHwwZK1o5Y1Grtpi152 hR92yQ8/hHk5wRlYgSPwUdgq18IQVn4m5nda4M4mPGly3WHlzCOB4oODbSaf3pm/Tj5D 5Fmvgh5fG2vGTIKcWlGHxUfE2csEHN8LIkIytviLWDUWU3Mzg5wUFO2UtbAOugp5J1mg EEIg== X-Gm-Message-State: ALoCoQktNTabes6/+paIgVa2ttqR1SXru3ZHiHcX01swk2izcUtp35pCC1d+wscIQxxA6KGq/4uQ X-Received: by 10.152.206.36 with SMTP id ll4mr27339277lac.6.1432142404557; Wed, 20 May 2015 10:20:04 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.3.133 with SMTP id c5ls201143lac.68.gmail; Wed, 20 May 2015 10:20:04 -0700 (PDT) X-Received: by 10.152.20.170 with SMTP id o10mr20989867lae.26.1432142404413; Wed, 20 May 2015 10:20:04 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id xa2si11526037lbb.156.2015.05.20.10.20.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 May 2015 10:20:04 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by lagr1 with SMTP id r1so83789232lag.0 for ; Wed, 20 May 2015 10:20:04 -0700 (PDT) X-Received: by 10.152.2.227 with SMTP id 3mr26802781lax.73.1432142404209; Wed, 20 May 2015 10:20:04 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1678579lbb; Wed, 20 May 2015 10:20:02 -0700 (PDT) X-Received: by 10.66.139.234 with SMTP id rb10mr65490174pab.153.1432142395009; Wed, 20 May 2015 10:19:55 -0700 (PDT) Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com. [209.85.220.47]) by mx.google.com with ESMTPS id ur6si1425522pac.178.2015.05.20.10.19.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 May 2015 10:19:55 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.47 as permitted sender) client-ip=209.85.220.47; Received: by padbw4 with SMTP id bw4so74076607pad.0 for ; Wed, 20 May 2015 10:19:54 -0700 (PDT) X-Received: by 10.68.191.101 with SMTP id gx5mr66203853pbc.148.1432142394023; Wed, 20 May 2015 10:19:54 -0700 (PDT) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id fp3sm16745952pdb.52.2015.05.20.10.19.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 May 2015 10:19:53 -0700 (PDT) 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> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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)