All of lore.kernel.org
 help / color / mirror / Atom feed
* [v4.4-rt PATCH] rt: trace: add rcuidle version macro for preemptirqsoff_hist and hrtimer_interrupt
@ 2016-03-07 23:45 Yang Shi
  2016-03-08  8:10 ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 6+ messages in thread
From: Yang Shi @ 2016-03-07 23:45 UTC (permalink / raw)
  To: tglx, bigeasy, rostedt; +Cc: linux-kernel, linux-rt-users, yang.shi

When building rt kernel with IRQSOFF_TRACER enabled but INTERRUPT_OFF_HIST or
PREEMPT_OFF_HIST disabled, the below build failure will be triggered:

| /home/yshi/linux-rt/kernel/trace/trace_irqsoff.c: In function 'time_hardirqs_on':
| /home/yshi/linux-rt/kernel/trace/trace_irqsoff.c:453:2: error: implicit declaration of function 'trace_preemptirqsoff_hist_rcuidle' [-Werror=implicit-function-declaration]
|   trace_preemptirqsoff_hist_rcuidle(IRQS_ON, 0);
|   ^
| cc1: some warnings being treated as errors
| /home/yshi/linux-rt/scripts/Makefile.build:258: recipe for target 'kernel/trace/trace_irqsoff.o' failed
| make[4]: *** [kernel/trace/trace_irqsoff.o] Error 1
| make[4]: *** Waiting for unfinished jobs....
| /home/yshi/linux-rt/scripts/Makefile.build:403: recipe for target 'kernel/trace' failed

Because rcuidle version is just defined by TRACE_EVENT when both
PREEMPT_OFF_HIST and PREEMPT_OFF_HIST is selected, otherwise just
trace_preemptirqsoff_hist is defined as a preprocessor macro.

Added rcuidle version macro when the condition is false, and added rcuidle
version macro for trace_hrtimer_interrupt_rcuidle even though it is not called
by anyone.

Reported-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Yang Shi <yang.shi@windriver.com>
---
Forward port the 4.1 version patch [1] to 4.4.
[1] http://www.spinics.net/lists/linux-rt-users/msg14037.html

 include/trace/events/hist.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/trace/events/hist.h b/include/trace/events/hist.h
index 6122e42..37f6eb8 100644
--- a/include/trace/events/hist.h
+++ b/include/trace/events/hist.h
@@ -9,6 +9,7 @@
 
 #if !defined(CONFIG_PREEMPT_OFF_HIST) && !defined(CONFIG_INTERRUPT_OFF_HIST)
 #define trace_preemptirqsoff_hist(a, b)
+#define trace_preemptirqsoff_hist_rcuidle(a, b)
 #else
 TRACE_EVENT(preemptirqsoff_hist,
 
@@ -33,6 +34,7 @@ TRACE_EVENT(preemptirqsoff_hist,
 
 #ifndef CONFIG_MISSED_TIMER_OFFSETS_HIST
 #define trace_hrtimer_interrupt(a, b, c, d)
+#define trace_hrtimer_interrupt_rcuidle(a, b, c, d)
 #else
 TRACE_EVENT(hrtimer_interrupt,
 
-- 
2.0.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [v4.4-rt PATCH] rt: trace: add rcuidle version macro for preemptirqsoff_hist and hrtimer_interrupt
  2016-03-07 23:45 [v4.4-rt PATCH] rt: trace: add rcuidle version macro for preemptirqsoff_hist and hrtimer_interrupt Yang Shi
@ 2016-03-08  8:10 ` Sebastian Andrzej Siewior
  2016-03-08 19:17   ` Steven Rostedt
  2016-03-09  8:23   ` Yang Shi
  0 siblings, 2 replies; 6+ messages in thread
From: Sebastian Andrzej Siewior @ 2016-03-08  8:10 UTC (permalink / raw)
  To: Yang Shi, tglx, rostedt; +Cc: linux-kernel, linux-rt-users

On 03/08/2016 12:45 AM, Yang Shi wrote:
> diff --git a/include/trace/events/hist.h b/include/trace/events/hist.h
> index 6122e42..37f6eb8 100644
> --- a/include/trace/events/hist.h
> +++ b/include/trace/events/hist.h
> @@ -9,6 +9,7 @@
>  
>  #if !defined(CONFIG_PREEMPT_OFF_HIST) && !defined(CONFIG_INTERRUPT_OFF_HIST)
>  #define trace_preemptirqsoff_hist(a, b)
> +#define trace_preemptirqsoff_hist_rcuidle(a, b)
>  #else
>  TRACE_EVENT(preemptirqsoff_hist,

I have this piece already in my tree.

>  
> @@ -33,6 +34,7 @@ TRACE_EVENT(preemptirqsoff_hist,
>  
>  #ifndef CONFIG_MISSED_TIMER_OFFSETS_HIST
>  #define trace_hrtimer_interrupt(a, b, c, d)
> +#define trace_hrtimer_interrupt_rcuidle(a, b, c, d)
>  #else
>  TRACE_EVENT(hrtimer_interrupt,

I was thinking about this but then I saw no users of it. Do we have
any? (haven't seen them in v4.1 either).

Sebastian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [v4.4-rt PATCH] rt: trace: add rcuidle version macro for preemptirqsoff_hist and hrtimer_interrupt
  2016-03-08  8:10 ` Sebastian Andrzej Siewior
@ 2016-03-08 19:17   ` Steven Rostedt
  2016-03-09 14:46     ` Sebastian Andrzej Siewior
  2016-03-09  8:23   ` Yang Shi
  1 sibling, 1 reply; 6+ messages in thread
From: Steven Rostedt @ 2016-03-08 19:17 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior; +Cc: Yang Shi, tglx, linux-kernel, linux-rt-users

On Tue, 8 Mar 2016 09:10:36 +0100
Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:

> On 03/08/2016 12:45 AM, Yang Shi wrote:
> > diff --git a/include/trace/events/hist.h b/include/trace/events/hist.h
> > index 6122e42..37f6eb8 100644
> > --- a/include/trace/events/hist.h
> > +++ b/include/trace/events/hist.h
> > @@ -9,6 +9,7 @@
> >  
> >  #if !defined(CONFIG_PREEMPT_OFF_HIST) && !defined(CONFIG_INTERRUPT_OFF_HIST)
> >  #define trace_preemptirqsoff_hist(a, b)
> > +#define trace_preemptirqsoff_hist_rcuidle(a, b)
> >  #else
> >  TRACE_EVENT(preemptirqsoff_hist,  
> 
> I have this piece already in my tree.

I don't see it in your git repo.


> 
> >  
> > @@ -33,6 +34,7 @@ TRACE_EVENT(preemptirqsoff_hist,
> >  
> >  #ifndef CONFIG_MISSED_TIMER_OFFSETS_HIST
> >  #define trace_hrtimer_interrupt(a, b, c, d)
> > +#define trace_hrtimer_interrupt_rcuidle(a, b, c, d)
> >  #else
> >  TRACE_EVENT(hrtimer_interrupt,  
> 
> I was thinking about this but then I saw no users of it. Do we have
> any? (haven't seen them in v4.1 either).

I don't see this defined either.

-- Steve

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [v4.4-rt PATCH] rt: trace: add rcuidle version macro for preemptirqsoff_hist and hrtimer_interrupt
  2016-03-08  8:10 ` Sebastian Andrzej Siewior
  2016-03-08 19:17   ` Steven Rostedt
@ 2016-03-09  8:23   ` Yang Shi
  1 sibling, 0 replies; 6+ messages in thread
From: Yang Shi @ 2016-03-09  8:23 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior, tglx, rostedt; +Cc: linux-kernel, linux-rt-users

On 3/8/2016 12:10 AM, Sebastian Andrzej Siewior wrote:
> On 03/08/2016 12:45 AM, Yang Shi wrote:
>> diff --git a/include/trace/events/hist.h b/include/trace/events/hist.h
>> index 6122e42..37f6eb8 100644
>> --- a/include/trace/events/hist.h
>> +++ b/include/trace/events/hist.h
>> @@ -9,6 +9,7 @@
>>   
>>   #if !defined(CONFIG_PREEMPT_OFF_HIST) && !defined(CONFIG_INTERRUPT_OFF_HIST)
>>   #define trace_preemptirqsoff_hist(a, b)
>> +#define trace_preemptirqsoff_hist_rcuidle(a, b)
>>   #else
>>   TRACE_EVENT(preemptirqsoff_hist,
> I have this piece already in my tree.
>
>>   
>> @@ -33,6 +34,7 @@ TRACE_EVENT(preemptirqsoff_hist,
>>   
>>   #ifndef CONFIG_MISSED_TIMER_OFFSETS_HIST
>>   #define trace_hrtimer_interrupt(a, b, c, d)
>> +#define trace_hrtimer_interrupt_rcuidle(a, b, c, d)
>>   #else
>>   TRACE_EVENT(hrtimer_interrupt,
> I was thinking about this but then I saw no users of it. Do we have
> any? (haven't seen them in v4.1 either).

AFAIK, no users.  It got brought in by the forward port of 4.1 patch. We 
could remove it.

Thanks,
Yang

>
> Sebastian
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [v4.4-rt PATCH] rt: trace: add rcuidle version macro for preemptirqsoff_hist and hrtimer_interrupt
  2016-03-08 19:17   ` Steven Rostedt
@ 2016-03-09 14:46     ` Sebastian Andrzej Siewior
  2016-03-09 15:08       ` Steven Rostedt
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Andrzej Siewior @ 2016-03-09 14:46 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Yang Shi, tglx, linux-kernel, linux-rt-users

* Steven Rostedt | 2016-03-08 14:17:13 [-0500]:

>> > index 6122e42..37f6eb8 100644
>> > --- a/include/trace/events/hist.h
>> > +++ b/include/trace/events/hist.h
>> > @@ -9,6 +9,7 @@
>> >  
>> >  #if !defined(CONFIG_PREEMPT_OFF_HIST) && !defined(CONFIG_INTERRUPT_OFF_HIST)
>> >  #define trace_preemptirqsoff_hist(a, b)
>> > +#define trace_preemptirqsoff_hist_rcuidle(a, b)
>> >  #else
>> >  TRACE_EVENT(preemptirqsoff_hist,  
>> 
>> I have this piece already in my tree.
>
>I don't see it in your git repo.
https://git.kernel.org/cgit/linux/kernel/git/rt/linux-rt-devel.git/commit/?h=linux-4.4.y-rt&id=bb2d8f27070df470619f216b02261b10dcc5161d

Sebastian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [v4.4-rt PATCH] rt: trace: add rcuidle version macro for preemptirqsoff_hist and hrtimer_interrupt
  2016-03-09 14:46     ` Sebastian Andrzej Siewior
@ 2016-03-09 15:08       ` Steven Rostedt
  0 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2016-03-09 15:08 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior; +Cc: Yang Shi, tglx, linux-kernel, linux-rt-users

On Wed, 9 Mar 2016 15:46:23 +0100
Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:

> * Steven Rostedt | 2016-03-08 14:17:13 [-0500]:
> 
> >> > index 6122e42..37f6eb8 100644
> >> > --- a/include/trace/events/hist.h
> >> > +++ b/include/trace/events/hist.h
> >> > @@ -9,6 +9,7 @@
> >> >  
> >> >  #if !defined(CONFIG_PREEMPT_OFF_HIST) && !defined(CONFIG_INTERRUPT_OFF_HIST)
> >> >  #define trace_preemptirqsoff_hist(a, b)
> >> > +#define trace_preemptirqsoff_hist_rcuidle(a, b)
> >> >  #else
> >> >  TRACE_EVENT(preemptirqsoff_hist,    
> >> 
> >> I have this piece already in my tree.  
> >
> >I don't see it in your git repo.  
> https://git.kernel.org/cgit/linux/kernel/git/rt/linux-rt-devel.git/commit/?h=linux-4.4.y-rt&id=bb2d8f27070df470619f216b02261b10dcc5161d

OK, *now* it's in your tree ;-)

-- Steve

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-03-09 15:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-07 23:45 [v4.4-rt PATCH] rt: trace: add rcuidle version macro for preemptirqsoff_hist and hrtimer_interrupt Yang Shi
2016-03-08  8:10 ` Sebastian Andrzej Siewior
2016-03-08 19:17   ` Steven Rostedt
2016-03-09 14:46     ` Sebastian Andrzej Siewior
2016-03-09 15:08       ` Steven Rostedt
2016-03-09  8:23   ` Yang Shi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.