mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
IBS pmu can be invoked via fixed set of core pmu events with 'precise_ip' set to 1. Add a simple event open test for all these events. Without kernel fix: $ sudo ./perf test -vv 76 76: AMD IBS via core pmu : --- start --- test child forked, pid 6553 Using CPUID AuthenticAMD-25-1-1 type: 0x0, config: 0x0, fd: 3 - Pass type: 0x0, config: 0x1, fd: -1 - Pass type: 0x4, config: 0x76, fd: -1 - Fail type: 0x4, config: 0xc1, fd: -1 - Fail type: 0x4, config: 0x12, fd: -1 - Pass test child finished with -1 ---- end ---- AMD IBS via core pmu: FAILED! With kernel fix: $ sudo ./perf test -vv 76 76: AMD IBS via core pmu : --- start --- test child forked, pid 7526 Using CPUID AuthenticAMD-25-1-1 type: 0x0, config: 0x0, fd: 3 - Pass type: 0x0, config: 0x1, fd: -1 - Pass type: 0x4, config: 0x76, fd: 3 - Pass type: 0x4, config: 0xc1, fd: 3 - Pass type: 0x4, config: 0x12, fd: -1 - Pass test child finished with 0 ---- end ---- AMD IBS via core pmu: Ok Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20230504110003.2548-5-ravi.bangoria@amd.com
19 lines
615 B
C
19 lines
615 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef ARCH_TESTS_H
|
|
#define ARCH_TESTS_H
|
|
|
|
struct test_suite;
|
|
|
|
/* Tests */
|
|
int test__rdpmc(struct test_suite *test, int subtest);
|
|
int test__insn_x86(struct test_suite *test, int subtest);
|
|
int test__intel_pt_pkt_decoder(struct test_suite *test, int subtest);
|
|
int test__intel_pt_hybrid_compat(struct test_suite *test, int subtest);
|
|
int test__bp_modify(struct test_suite *test, int subtest);
|
|
int test__x86_sample_parsing(struct test_suite *test, int subtest);
|
|
int test__amd_ibs_via_core_pmu(struct test_suite *test, int subtest);
|
|
|
|
extern struct test_suite *arch_tests[];
|
|
|
|
#endif
|