x86 arch provides the testing for conversion between tsc and perf time, the testing is located in x86 arch folder. Move this testing out from x86 arch folder and place it into the common testing folder, so allows to execute tsc testing on other architectures (e.g. Arm64). This patch removes the inclusion of "arch-tests.h" from the testing code, this can avoid building failure if any arch has no this header file. Committer testing: $ perf test -v tsc Couldn't bump rlimit(MEMLOCK), failures may take place when creating BPF maps, etc 70: Convert perf time to TSC : --- start --- test child forked, pid 4032834 mmap size 528384B 1st event perf time 165409788843605 tsc 336578703793868 rdtsc time 165409788854986 tsc 336578703837038 2nd event perf time 165409788855487 tsc 336578703838935 test child finished with 0 ---- end ---- Convert perf time to TSC: Ok $ Signed-off-by: Leo Yan <leo.yan@linaro.org> Acked-by: Jiri Olsa <jolsa@redhat.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Link: https://lore.kernel.org/r/20201019100236.23675-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
23 lines
591 B
C
23 lines
591 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);
|
|
|
|
#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
|