mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Arjan van de Ven <arjan@linux.intel.com>
Subject: Re: timers: Make flags output in the timer_start tracepoint useful
Date: Fri, 10 Feb 2017 16:28:28 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1702101627090.4036@nanos> (raw)
In-Reply-To: <20170210095135.45671d44@gandalf.local.home>

On Fri, 10 Feb 2017, Steven Rostedt wrote:

> On Fri, 10 Feb 2017 15:37:11 +0100 (CET)
> Thomas Gleixner <tglx@linutronix.de> wrote:
> 
> > > > --- a/include/trace/events/timer.h
> > > > +++ b/include/trace/events/timer.h
> > > > @@ -36,6 +36,13 @@ DEFINE_EVENT(timer_class, timer_init,
> > > >  	TP_ARGS(timer)
> > > >  );
> > > >  
> > > > +#define decode_timer_flags(flags)			\
> > > > +	__print_flags(flags, "|",			\
> > > > +		{  TIMER_MIGRATING,	"M" },		\
> > > > +		{  TIMER_DEFERRABLE,	"D" },		\
> > > > +		{  TIMER_PINNED,	"P" },		\
> > > > +		{  TIMER_IRQSAFE,	"I" })
> > > > +
> > > >  /**
> > > >   * timer_start - called when the timer is started
> > > >   * @timer:	pointer to struct timer_list
> > > > @@ -65,9 +72,12 @@ TRACE_EVENT(timer_start,
> > > >  		__entry->flags		= flags;
> > > >  	),
> > > >  
> > > > -	TP_printk("timer=%p function=%pf expires=%lu [timeout=%ld] flags=0x%08x",
> > > > +	TP_printk("timer=%p function=%pf expires=%lu [timeout=%ld] cpu=%u idx=%u flags=%s",
> > > >  		  __entry->timer, __entry->function, __entry->expires,
> > > > -		  (long)__entry->expires - __entry->now, __entry->flags)
> > > > +		  (long)__entry->expires - __entry->now,
> > > > +		  __entry->flags & TIMER_CPUMASK,
> > > > +		  __entry->flags >> TIMER_ARRAYSHIFT,
> > > > +		  decode_timer_flags(__entry->flags & TIMER_TRACE_FLAGMASK))  
> > > 
> > > Hi Thomas,
> > > 
> > > This all looks good, but I can't find TIMER_TRACE_FLAGMASK. Was that
> > > added by another patch?  
> > 
> > -ENO_QUILT_REFRESH ....
> 
> I'm wondering if it wouldn't just make sense to add another mask in
> include/linux/timer.h along with the other TIMER macros?

That's the missing hunk from timer.h which I did not refresh after testing it ....

--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -66,6 +66,8 @@ struct timer_list {
 #define TIMER_ARRAYSHIFT       22
 #define TIMER_ARRAYMASK                0xFFC00000
 
+#define TIMER_TRACE_FLAGMASK   (TIMER_MIGRATING | TIMER_DEFERRABLE | TIMER_PINNED | TIMER_IRQSAFE)
+
 #define __TIMER_INITIALIZER(_function, _expires, _data, _flags) { \
                .entry = { .next = TIMER_ENTRY_STATIC },        \
                .function = (_function),                        \

  reply	other threads:[~2017-02-10 15:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-10 13:25 Thomas Gleixner
2017-02-10 14:19 ` Steven Rostedt
2017-02-10 14:37   ` Thomas Gleixner
2017-02-10 14:51     ` Steven Rostedt
2017-02-10 15:28       ` Thomas Gleixner [this message]
2017-02-10 15:41         ` [PATCH V2] " Thomas Gleixner
2017-02-10 16:11           ` Steven Rostedt

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=alpine.DEB.2.20.1702101627090.4036@nanos \
    --to=tglx@linutronix.de \
    --cc=arjan@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    /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®