perf test: Add 'struct test *' to the test functions
This way we'll be able to pass more test specific parameters without having to change this function signature. Will be used by the upcoming 'shell tests', shell scripts that will call perf tools and check if they work as expected, comparing its effects on the system (think 'perf probe foo') the output produced, etc. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Thomas Richter <tmricht@linux.vnet.ibm.com> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-wq250w7j1opbzyiynozuajbl@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
#ifndef ARCH_TESTS_H
|
||||
#define ARCH_TESTS_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
struct test;
|
||||
|
||||
/* Tests */
|
||||
int test__rdpmc(int subtest);
|
||||
int test__perf_time_to_tsc(int subtest);
|
||||
int test__insn_x86(int subtest);
|
||||
int test__intel_cqm_count_nmi_context(int subtest);
|
||||
int test__rdpmc(struct test *test __maybe_unused, int subtest);
|
||||
int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest);
|
||||
int test__insn_x86(struct test *test __maybe_unused, int subtest);
|
||||
int test__intel_cqm_count_nmi_context(struct test *test __maybe_unused, int subtest);
|
||||
|
||||
#ifdef HAVE_DWARF_UNWIND_SUPPORT
|
||||
struct thread;
|
||||
|
@@ -171,7 +171,7 @@ static int test_data_set(struct test_data *dat_set, int x86_64)
|
||||
* verbose (-v) option to see all the instructions and whether or not they
|
||||
* decoded successfuly.
|
||||
*/
|
||||
int test__insn_x86(int subtest __maybe_unused)
|
||||
int test__insn_x86(struct test *test __maybe_unused, int subtest __maybe_unused)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
|
@@ -36,7 +36,7 @@ static pid_t spawn(void)
|
||||
* the last read counter value to avoid triggering a WARN_ON_ONCE() in
|
||||
* smp_call_function_many() caused by sending IPIs from NMI context.
|
||||
*/
|
||||
int test__intel_cqm_count_nmi_context(int subtest __maybe_unused)
|
||||
int test__intel_cqm_count_nmi_context(struct test *test __maybe_unused, int subtest __maybe_unused)
|
||||
{
|
||||
struct perf_evlist *evlist = NULL;
|
||||
struct perf_evsel *evsel = NULL;
|
||||
|
@@ -37,7 +37,7 @@
|
||||
* %0 is returned, otherwise %-1 is returned. If TSC conversion is not
|
||||
* supported then then the test passes but " (not supported)" is printed.
|
||||
*/
|
||||
int test__perf_time_to_tsc(int subtest __maybe_unused)
|
||||
int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe_unused)
|
||||
{
|
||||
struct record_opts opts = {
|
||||
.mmap_pages = UINT_MAX,
|
||||
|
@@ -154,7 +154,7 @@ out_close:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test__rdpmc(int subtest __maybe_unused)
|
||||
int test__rdpmc(struct test *test __maybe_unused, int subtest __maybe_unused)
|
||||
{
|
||||
int status = 0;
|
||||
int wret = 0;
|
||||
|
Reference in New Issue
Block a user