mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 16:15:11 +00:00
perf tests bp_account: Add dedicated checking helper is_supported()
The arm architecture supports breakpoint accounting but it doesn't support breakpoint overflow signal handling. The current code uses the same checking helper, thus it disables both testings (bp_account and bp_signal) for arm platform. For handling two testings separately, this patch adds a dedicated checking helper is_supported() for breakpoint accounting testing, thus it allows supporting breakpoint accounting testing on arm platform; the old helper test__bp_signal_is_supported() is only used to checking for breakpoint overflow signal testing. Signed-off-by: Leo Yan <leo.yan@linaro.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Brajeswar Ghosh <brajeswar.linux@gmail.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Song Liu <songliubraving@fb.com> Cc: Souptick Joarder <jrdr.linux@gmail.com> Cc: Will Deacon <will@kernel.org> Link: http://lore.kernel.org/lkml/20191018085531.6348-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
12d795637b
commit
e533eadf65
3 changed files with 18 additions and 1 deletions
|
@ -188,3 +188,19 @@ int test__bp_accounting(struct test *test __maybe_unused, int subtest __maybe_un
|
||||||
|
|
||||||
return bp_accounting(wp_cnt, share);
|
return bp_accounting(wp_cnt, share);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool test__bp_account_is_supported(void)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* PowerPC and S390 do not support creation of instruction
|
||||||
|
* breakpoints using the perf_event interface.
|
||||||
|
*
|
||||||
|
* Just disable the test for these architectures until these
|
||||||
|
* issues are resolved.
|
||||||
|
*/
|
||||||
|
#if defined(__powerpc__) || defined(__s390x__)
|
||||||
|
return false;
|
||||||
|
#else
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
|
@ -121,7 +121,7 @@ static struct test generic_tests[] = {
|
||||||
{
|
{
|
||||||
.desc = "Breakpoint accounting",
|
.desc = "Breakpoint accounting",
|
||||||
.func = test__bp_accounting,
|
.func = test__bp_accounting,
|
||||||
.is_supported = test__bp_signal_is_supported,
|
.is_supported = test__bp_account_is_supported,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.desc = "Watchpoint",
|
.desc = "Watchpoint",
|
||||||
|
|
|
@ -111,6 +111,7 @@ int test__map_groups__merge_in(struct test *t, int subtest);
|
||||||
int test__time_utils(struct test *t, int subtest);
|
int test__time_utils(struct test *t, int subtest);
|
||||||
|
|
||||||
bool test__bp_signal_is_supported(void);
|
bool test__bp_signal_is_supported(void);
|
||||||
|
bool test__bp_account_is_supported(void);
|
||||||
bool test__wp_is_supported(void);
|
bool test__wp_is_supported(void);
|
||||||
|
|
||||||
#if defined(__arm__) || defined(__aarch64__)
|
#if defined(__arm__) || defined(__aarch64__)
|
||||||
|
|
Loading…
Reference in a new issue