diff options
author | Athira Rajeev <atrajeev@linux.vnet.ibm.com> | 2022-01-27 12:49:54 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-03-01 23:37:49 +1100 |
commit | c315669e2fbd71bb9387066f60f0d91b0ceb28f3 (patch) | |
tree | b514170841045565ffe93c3622fe5eef3cfad45f /tools/testing/selftests/powerpc/pmu/sampling_tests/misc.h | |
parent | selftests/powerpc/pmu: Include mmap_buffer field as part of struct event (diff) | |
download | linux-dev-c315669e2fbd71bb9387066f60f0d91b0ceb28f3.tar.xz linux-dev-c315669e2fbd71bb9387066f60f0d91b0ceb28f3.zip |
selftests/powerpc/pmu: Add support for perf sampling tests
Add support functions for enabling perf sampling test in a new folder
"sampling_tests" under "selftests/powerpc/pmu". This includes support
functions for allocating and processing the mmap buffer. These functions
are added/defined in "sampling_tests/misc.*" files.
Also updates the corresponding Makefiles in "selftests/powerpc" and
"sampling_tests" folder.
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
[mpe: Drop unneeded bits from the Makefile]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220127072012.662451-3-kjain@linux.ibm.com
Diffstat (limited to 'tools/testing/selftests/powerpc/pmu/sampling_tests/misc.h')
-rw-r--r-- | tools/testing/selftests/powerpc/pmu/sampling_tests/misc.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/testing/selftests/powerpc/pmu/sampling_tests/misc.h b/tools/testing/selftests/powerpc/pmu/sampling_tests/misc.h new file mode 100644 index 000000000000..291f9adba817 --- /dev/null +++ b/tools/testing/selftests/powerpc/pmu/sampling_tests/misc.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright 2022, Athira Rajeev, IBM Corp. + */ + +#include "../event.h" + +void *event_sample_buf_mmap(int fd, int mmap_pages); +void *__event_read_samples(void *sample_buff, size_t *size, u64 *sample_count); |