mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Badhri Jagan Sridharan <badhri@google.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>,
	Badhri Jagan Sridharan <Badhri@google.com>,
	John Stultz <john.stultz@linaro.org>
Subject: [PATCH 4/7] tracing: timer: Add deferrable flag to timer_start
Date: Wed, 20 May 2015 10:19:33 -0700	[thread overview]
Message-ID: <1432142376-2077-5-git-send-email-john.stultz@linaro.org> (raw)
In-Reply-To: <1432142376-2077-1-git-send-email-john.stultz@linaro.org>

From: Badhri Jagan Sridharan <badhri@google.com>

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 <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 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


  parent reply	other threads:[~2015-05-20 17:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20 17:19 [PATCH 0/7] Current queue for tip/timers/core John Stultz
2015-05-20 17:19 ` [PATCH 1/7] time: make sure tz_minuteswest is set to a valid value when setting time John Stultz
2015-05-20 17:19 ` [PATCH 2/7] timekeeping: Provide new API to get the current time resolution John Stultz
2015-05-20 17:53   ` Harald Geyer
2015-05-20 18:04     ` John Stultz
2015-05-20 18:55       ` Harald Geyer
2015-05-20 17:19 ` [PATCH 3/7] time: Rework debugging variables so they aren't global John Stultz
2015-05-21  6:14   ` Ingo Molnar
2015-05-20 17:19 ` John Stultz [this message]
2015-05-21  6:18   ` [PATCH 4/7] tracing: timer: Add deferrable flag to timer_start Ingo Molnar
2015-05-22 22:58     ` Thomas Gleixner
2015-05-23  8:17       ` Ingo Molnar
2015-05-24  6:20         ` Ingo Molnar
2015-05-20 17:19 ` [PATCH 5/7] time: include math64.h in time64.h John Stultz
2015-05-21  6:20   ` Ingo Molnar
2015-05-20 17:19 ` [PATCH 6/7] s390: time: Provide read_boot_clock64() and read_persistent_clock64() John Stultz
2015-05-21  6:23   ` Ingo Molnar
2015-05-20 17:19 ` [PATCH 7/7] time: Remove read_boot_clock() John Stultz
2015-05-21  6:25   ` Ingo Molnar
2015-05-20 18:42 ` [PATCH 0/7] Current queue for tip/timers/core John Stultz
2015-05-21  6:19 ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1432142376-2077-5-git-send-email-john.stultz@linaro.org \
    --to=john.stultz@linaro.org \
    --cc=badhri@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®