selftests/powerpc/pmu: Add test for hardware cache events
authorKajol Jain <kjain@linux.ibm.com>
Fri, 10 Jun 2022 13:41:13 +0000 (19:11 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 28 Jun 2022 22:57:45 +0000 (08:57 +1000)
commitab8bca92aebcb59d81dc95ddebe241052f2bb411
tree12e633c0db2f7a2aac3940065a1a17f571de029d
parent9ac92fecd1dbfcabd64925571b94151d7a814878
selftests/powerpc/pmu: Add test for hardware cache events

The testcase checks if the transalation of a generic hardware cache
event is done properly via perf interface. The hardware cache events has
type as PERF_TYPE_HW_CACHE and each event points to raw event code id.

Testcase checks different combination of cache level, cache event
operation type and cache event result type and verify for a given event
code, whether transalation matches with the current cache event mappings
via perf interface.

Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220610134113.62991-36-atrajeev@linux.vnet.ibm.com
tools/testing/selftests/powerpc/pmu/event_code_tests/Makefile
tools/testing/selftests/powerpc/pmu/event_code_tests/hw_cache_event_type_test.c [new file with mode: 0644]