-rt kernel just can show 8 perf events?
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
Quoted 5 lines · * 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?
Quoted 2 lines
Regards,
Yang
Sebastian
Quoted 9 lines · Sebastian Andrzej Siewior
Quoted 5 lines · * 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
Quoted 6 lines
Quoted 3 lines
Regards,
YangSebastian
Quoted 4 lines · * Shi, Yang | 2015-12-11 09:57:06 [-0800]:
Quoted 1 line · Sebastian Andrzej Siewior
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:
kernel/events/core.c +1 -0
@@ -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)
Quoted 1 line
Yang
Sebastian
Quoted 24 lines · Sebastian Andrzej Siewior
Quoted 4 lines · * Shi, Yang | 2015-12-11 09:57:06 [-0800]:
Quoted 1 line · Sebastian Andrzej Siewior
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%)
Quoted 3 lines
8.705696429 seconds time elapsedonce I apply this chunk:
Thanks. I will have a try with the patch soon.
Yang
Quoted 17 lines
kernel/events/core.c +1
-0@@ -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)Quoted 2 lines
Yang
Sebastian