linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* -rt kernel just can show 8 perf events?
@ 2015-12-01 20:36 Shi, Yang
  2015-12-11 17:36 ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 5+ messages in thread
From: Shi, Yang @ 2015-12-01 20:36 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Steven Rostedt; +Cc: linux-rt-users

Hi folks,

I'm running some perf program on my x86-64 machine with 4.1.12-rt13 
kernel, but I found just 8 perf events can be showed up with "perf stat 
-e" on -rt kernel, but mainline kernel is fine.

I traced 14 events (tried different number in my test, always > 8), then 
I got:

             29692      cs 

                104      page-faults 

                104      minor-faults 

                  0      major-faults 

          100122071      iTLB-load-misses 

             447793      dTLB-load-misses 

              13655      dTLB-store-misses 

          201620583      branch-misses 

      <not counted>      cache-misses               (0.00%)
      <not counted>      cycles                     (0.00%)
      <not counted>      dtlb_misses_walk_duration  (0.00%)
      <not counted>      dtlb_misses_walk_completed  (0.00%)
      <not counted>      itlb_misses_walk_duration  (0.00%)
      <not counted>      itlb_misses_walk_completed  (0.00%)

No matter how many events are traced, just 8 events are showed with 
meaningful data, all others are showed up as "not counted".

Any hint is appreciated.

Regards,
Yang

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

* Re: -rt kernel just can show 8 perf events?
  2015-12-01 20:36 -rt kernel just can show 8 perf events? Shi, Yang
@ 2015-12-11 17:36 ` Sebastian Andrzej Siewior
  2015-12-11 17:57   ` Shi, Yang
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Andrzej Siewior @ 2015-12-11 17:36 UTC (permalink / raw)
  To: Shi, Yang; +Cc: Arnaldo Carvalho de Melo, Steven Rostedt, linux-rt-users

* Shi, Yang | 2015-12-01 12:36:37 [-0800]:

>Hi folks,
>
>I'm running some perf program on my x86-64 machine with 4.1.12-rt13
>kernel, but I found just 8 perf events can be showed up with "perf
>stat -e" on -rt kernel, but mainline kernel is fine.

And 4.1.12 (without -rt13) is not having this kind of problem?

>Regards,
>Yang

Sebastian

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

* Re: -rt kernel just can show 8 perf events?
  2015-12-11 17:36 ` Sebastian Andrzej Siewior
@ 2015-12-11 17:57   ` Shi, Yang
  2016-02-04 15:16     ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 5+ messages in thread
From: Shi, Yang @ 2015-12-11 17:57 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: Arnaldo Carvalho de Melo, Steven Rostedt, linux-rt-users

On 12/11/2015 9:36 AM, Sebastian Andrzej Siewior wrote:
> * Shi, Yang | 2015-12-01 12:36:37 [-0800]:
>
>> Hi folks,
>>
>> I'm running some perf program on my x86-64 machine with 4.1.12-rt13
>> kernel, but I found just 8 perf events can be showed up with "perf
>> stat -e" on -rt kernel, but mainline kernel is fine.
>
> And 4.1.12 (without -rt13) is not having this kind of problem?

No. mainline 4.1.12 works well.

Yang

>
>> Regards,
>> Yang
>
> Sebastian
>


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

* Re: -rt kernel just can show 8 perf events?
  2015-12-11 17:57   ` Shi, Yang
@ 2016-02-04 15:16     ` Sebastian Andrzej Siewior
  2016-02-04 23:41       ` Shi, Yang
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Andrzej Siewior @ 2016-02-04 15:16 UTC (permalink / raw)
  To: Shi, Yang; +Cc: Arnaldo Carvalho de Melo, Steven Rostedt, linux-rt-users

* Shi, Yang | 2015-12-11 09:57:06 [-0800]:

>On 12/11/2015 9:36 AM, Sebastian Andrzej Siewior wrote:
>>And 4.1.12 (without -rt13) is not having this kind of problem?
>
>No. mainline 4.1.12 works well.

The same thing here. But I get this:

 Performance counter stats for 'tar tJ':

           144,407      cs                                                          
            16,733      page-faults                                                 
            16,732      minor-faults                                                
                 1      major-faults                                                
           805,335      iTLB-load-misses                                              (24.83%)
         6,606,698      dTLB-load-misses                                              (24.63%)
     3,734,425,072      branches                                                      (37.35%)
       228,660,856      L1-dcache-prefetches                                          (37.06%)
         4,564,273      L1-icache-prefetches                                          (49.68%)
       399,365,890      branch-misses             #   10.69% of all branches          (62.63%)
        79,278,129      cache-misses                                                  (62.96%)
    30,825,564,763      cycles                                                        (50.79%)

       8.705696429 seconds time elapsed

once I apply this chunk:

diff --git a/kernel/events/core.c b/kernel/events/core.c
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -802,6 +802,7 @@ static void __perf_mux_hrtimer_init(struct perf_cpu_context *cpuctx, int cpu)
 	raw_spin_lock_init(&cpuctx->hrtimer_lock);
 	hrtimer_init(timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED);
 	timer->function = perf_mux_hrtimer_handler;
+	timer->irqsafe = 1;
 }
 
 static int perf_mux_hrtimer_restart(struct perf_cpu_context *cpuctx)

>Yang

Sebastian

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

* Re: -rt kernel just can show 8 perf events?
  2016-02-04 15:16     ` Sebastian Andrzej Siewior
@ 2016-02-04 23:41       ` Shi, Yang
  0 siblings, 0 replies; 5+ messages in thread
From: Shi, Yang @ 2016-02-04 23:41 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: Arnaldo Carvalho de Melo, Steven Rostedt, linux-rt-users

On 2/4/2016 7:16 AM, Sebastian Andrzej Siewior wrote:
> * Shi, Yang | 2015-12-11 09:57:06 [-0800]:
>
>> On 12/11/2015 9:36 AM, Sebastian Andrzej Siewior wrote:
>>> And 4.1.12 (without -rt13) is not having this kind of problem?
>>
>> No. mainline 4.1.12 works well.
>
> The same thing here. But I get this:
>
>   Performance counter stats for 'tar tJ':
>
>             144,407      cs
>              16,733      page-faults
>              16,732      minor-faults
>                   1      major-faults
>             805,335      iTLB-load-misses                                              (24.83%)
>           6,606,698      dTLB-load-misses                                              (24.63%)
>       3,734,425,072      branches                                                      (37.35%)
>         228,660,856      L1-dcache-prefetches                                          (37.06%)
>           4,564,273      L1-icache-prefetches                                          (49.68%)
>         399,365,890      branch-misses             #   10.69% of all branches          (62.63%)
>          79,278,129      cache-misses                                                  (62.96%)
>      30,825,564,763      cycles                                                        (50.79%)
>
>         8.705696429 seconds time elapsed
>
> once I apply this chunk:

Thanks. I will have a try with the patch soon.

Yang

>
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -802,6 +802,7 @@ static void __perf_mux_hrtimer_init(struct perf_cpu_context *cpuctx, int cpu)
>   	raw_spin_lock_init(&cpuctx->hrtimer_lock);
>   	hrtimer_init(timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED);
>   	timer->function = perf_mux_hrtimer_handler;
> +	timer->irqsafe = 1;
>   }
>
>   static int perf_mux_hrtimer_restart(struct perf_cpu_context *cpuctx)
>
>> Yang
>
> Sebastian
>


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

end of thread, other threads:[~2016-02-04 23:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-01 20:36 -rt kernel just can show 8 perf events? Shi, Yang
2015-12-11 17:36 ` Sebastian Andrzej Siewior
2015-12-11 17:57   ` Shi, Yang
2016-02-04 15:16     ` Sebastian Andrzej Siewior
2016-02-04 23:41       ` Shi, Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).