]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/powerpc/pmu: Add utility functions to post process the mmap buffer
authorKajol Jain <kjain@linux.ibm.com>
Thu, 27 Jan 2022 07:19:56 +0000 (12:49 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 1 Mar 2022 12:38:13 +0000 (23:38 +1100)
commite26c71dcbb0a14d9bd07af06c7f7ebc6985d858f
tree851e41e79987f187467639c831398ff9de412935
parent26a9f4d6557916cede748e60b035c99add614c3a
selftests/powerpc/pmu: Add utility functions to post process the mmap buffer

Add couple of basic utility functions to post process the mmap buffer.
It includes function to read the total number of samples present in the
mmap buffer and function to get the address of the first sample.

Add function "get_intr_regs" which will return pointer to interrupt
registers present in the sample, incase sample type
PERF_SAMPLE_REGS_INTR is set.

Add functions "get_reg_value" which can be used to read any interrupt
register value from a given sample.

Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220127072012.662451-5-kjain@linux.ibm.com
tools/testing/selftests/powerpc/pmu/sampling_tests/misc.c
tools/testing/selftests/powerpc/pmu/sampling_tests/misc.h