Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1578548

Re: timers: Make flags output in the timer_start tracepoint useful

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: timers: Make flags output in the timer_start tracepoint useful
Date 2017-02-10 16:30 +0100
Message-ID <t9lj3-5a6-3@gated-at.bofh.it> (permalink)
References <t9kdj-4sU-5@gated-at.bofh.it> <t9kdj-4sU-3@gated-at.bofh.it> <t9kwG-4AQ-27@gated-at.bofh.it> <t9kQ2-4Jf-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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),                        \

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: timers:  Make flags output in the timer_start tracepoint useful Steven Rostedt <rostedt@goodmis.org> - 2017-02-10 15:20 +0100
  Re: timers: Make flags output in the timer_start tracepoint useful Thomas Gleixner <tglx@linutronix.de> - 2017-02-10 15:40 +0100
    Re: timers: Make flags output in the timer_start tracepoint useful Steven Rostedt <rostedt@goodmis.org> - 2017-02-10 16:00 +0100
      Re: timers: Make flags output in the timer_start tracepoint useful Thomas Gleixner <tglx@linutronix.de> - 2017-02-10 16:30 +0100
        [PATCH V2]  timers: Make flags output in the timer_start tracepoint  useful Thomas Gleixner <tglx@linutronix.de> - 2017-02-10 16:50 +0100
          Re: [PATCH V2]  timers: Make flags output in the timer_start  tracepoint useful Steven Rostedt <rostedt@goodmis.org> - 2017-02-10 17:20 +0100

csiph-web