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>
24 lines
653 B
C
24 lines
653 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef ARCH_TESTS_H
|
|
#define ARCH_TESTS_H
|
|
|
|
#include <linux/compiler.h>
|
|
struct test;
|
|
|
|
/* Tests */
|
|
int test__rdpmc(struct test *test __maybe_unused, int subtest);
|
|
int test__insn_x86(struct test *test __maybe_unused, int subtest);
|
|
int test__intel_pt_pkt_decoder(struct test *test, int subtest);
|
|
int test__bp_modify(struct test *test, int subtest);
|
|
int test__x86_sample_parsing(struct test *test, int subtest);
|
|
|
|
#ifdef HAVE_DWARF_UNWIND_SUPPORT
|
|
struct thread;
|
|
struct perf_sample;
|
|
int test__arch_unwind_sample(struct perf_sample *sample,
|
|
struct thread *thread);
|
|
#endif
|
|
|
|
extern struct test arch_tests[];
|
|
|
|
#endif
|