diff options
author | 2021-03-03 08:01:25 -0800 | |
---|---|---|
committer | 2021-03-06 16:54:32 -0300 | |
commit | 7d9d4c6edba93cd96899affe2fc60c3341df152c (patch) | |
tree | 3e55ffb00101a02c447ab2cc27c1e234dab42916 /tools/perf/arch/x86/tests/arch-tests.c | |
parent | perf test: Fix sample-parsing failure on non-x86 platforms (diff) | |
download | linux-7d9d4c6edba93cd96899affe2fc60c3341df152c.tar.gz linux-7d9d4c6edba93cd96899affe2fc60c3341df152c.tar.bz2 linux-7d9d4c6edba93cd96899affe2fc60c3341df152c.zip |
perf test: Support the ins_lat check in the X86 specific test
The ins_lat of PERF_SAMPLE_WEIGHT_STRUCT stands for the instruction
latency, which is only available for X86. Add a X86 specific test for
the ins_lat and PERF_SAMPLE_WEIGHT_STRUCT type.
The test__x86_sample_parsing() uses the same way as the
test__sample_parsing() to verify a sample type. Since the ins_lat and
PERF_SAMPLE_WEIGHT_STRUCT are the only X86 specific sample type for now,
the test__x86_sample_parsing() only verify the PERF_SAMPLE_WEIGHT_STRUCT
type. Other sample types are still verified in the generic test.
$ perf test 77 -v
77: x86 Sample parsing :
--- start ---
test child forked, pid 102370
test child finished with 0
---- end ----
x86 Sample parsing: Ok
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Link: http://lore.kernel.org/lkml/1614787285-104151-2-git-send-email-kan.liang@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/arch/x86/tests/arch-tests.c')
-rw-r--r-- | tools/perf/arch/x86/tests/arch-tests.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/arch/x86/tests/arch-tests.c b/tools/perf/arch/x86/tests/arch-tests.c index bc25d727b4e9..71aa67367ad6 100644 --- a/tools/perf/arch/x86/tests/arch-tests.c +++ b/tools/perf/arch/x86/tests/arch-tests.c @@ -31,6 +31,10 @@ struct test arch_tests[] = { }, #endif { + .desc = "x86 Sample parsing", + .func = test__x86_sample_parsing, + }, + { .func = NULL, }, |