diff options
| author | Thomas Richter <[email protected]> | 2022-06-10 15:19:00 +0200 | 
|---|---|---|
| committer | Alexander Gordeev <[email protected]> | 2022-06-23 17:23:59 +0200 | 
| commit | be857b7f77d130dbbd47c91fc35198b040f35865 (patch) | |
| tree | e0b5f4657a7dfef72c6362a6f9c5dfd90528ad47 /tools/perf/scripts/python/compaction-times.py | |
| parent | af2debd58bd769e38f538143f0d332e15d753396 (diff) | |
s390/cpumf: Handle events cycles and instructions identical
Events CPU_CYCLES and INSTRUCTIONS can be submitted with two different
perf_event attribute::type values:
 - PERF_TYPE_HARDWARE: when invoked via perf tool predefined events name
   cycles or cpu-cycles or instructions.
 - pmu->type: when invoked via perf tool event name cpu_cf/CPU_CYLCES/ or
   cpu_cf/INSTRUCTIONS/. This invocation also selects the PMU to which
   the event belongs.
Handle both type of invocations identical for events CPU_CYLCES and
INSTRUCTIONS. They address the same hardware.
The result is different when event modifier exclude_kernel is also set.
Invocation with event modifier for user space event counting fails.
Output before:
 # perf stat -e cpum_cf/cpu_cycles/u -- true
 Performance counter stats for 'true':
   <not supported>      cpum_cf/cpu_cycles/u
       0.000761033 seconds time elapsed
       0.000076000 seconds user
       0.000725000 seconds sys
 #
Output after:
 # perf stat -e cpum_cf/cpu_cycles/u -- true
 Performance counter stats for 'true':
           349,613      cpum_cf/cpu_cycles/u
       0.000844143 seconds time elapsed
       0.000079000 seconds user
       0.000800000 seconds sys
 #
Fixes: 6a82e23f45fe ("s390/cpumf: Adjust registration of s390 PMU device drivers")
Signed-off-by: Thomas Richter <[email protected]>
Acked-by: Sumanth Korikkar <[email protected]>
[[email protected] corrected commit ID of Fixes commit]
Signed-off-by: Alexander Gordeev <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/compaction-times.py')
0 files changed, 0 insertions, 0 deletions