Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8b167f9 authored by Matt Fleming's avatar Matt Fleming Committed by Arnaldo Carvalho de Melo
Browse files

perf tests: Move x86 tests into arch directory



Move out the x86-specific tests into tools/perf/arch/x86/tests and
define an 'arch_tests' array, which is the list of tests that only apply
to the build architecture.

We can also now begin to get rid of some of the #ifdef code that is
present in the generic perf tests.

Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kanaka Juvva <kanaka.d.juvva@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Vikas Shivappa <vikas.shivappa@intel.com>
Cc: Vince Weaver <vince@deater.net>
Link: http://lkml.kernel.org/n/tip-9s68h4ptg06ah0lgnjz55mqn@git.kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 31b6753f
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
#ifndef ARCH_TESTS_H
#ifndef ARCH_TESTS_H
#define ARCH_TESTS_H
#define ARCH_TESTS_H


/* Tests */
int test__rdpmc(void);
int test__perf_time_to_tsc(void);
int test__insn_x86(void);

#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[];
extern struct test arch_tests[];


#endif
#endif
+3 −0
Original line number Original line Diff line number Diff line
@@ -2,3 +2,6 @@ libperf-$(CONFIG_DWARF_UNWIND) += regs_load.o
libperf-$(CONFIG_DWARF_UNWIND) += dwarf-unwind.o
libperf-$(CONFIG_DWARF_UNWIND) += dwarf-unwind.o


libperf-y += arch-tests.o
libperf-y += arch-tests.o
libperf-y += rdpmc.o
libperf-y += perf-time-to-tsc.o
libperf-$(CONFIG_AUXTRACE) += insn-x86.o
+20 −0
Original line number Original line Diff line number Diff line
@@ -3,6 +3,26 @@
#include "arch-tests.h"
#include "arch-tests.h"


struct test arch_tests[] = {
struct test arch_tests[] = {
	{
		.desc = "x86 rdpmc test",
		.func = test__rdpmc,
	},
	{
		.desc = "Test converting perf time to TSC",
		.func = test__perf_time_to_tsc,
	},
#ifdef HAVE_DWARF_UNWIND_SUPPORT
	{
		.desc = "Test dwarf unwind",
		.func = test__dwarf_unwind,
	},
#endif
#ifdef HAVE_AUXTRACE_SUPPORT
	{
		.desc = "Test x86 instruction decoder - new instructions",
		.func = test__insn_x86,
	},
#endif
	{
	{
		.func = NULL,
		.func = NULL,
	},
	},
+1 −0
Original line number Original line Diff line number Diff line
@@ -5,6 +5,7 @@
#include "event.h"
#include "event.h"
#include "debug.h"
#include "debug.h"
#include "tests/tests.h"
#include "tests/tests.h"
#include "arch-tests.h"


#define STACK_SIZE 8192
#define STACK_SIZE 8192


Loading