linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Will Deacon <will@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	Brajeswar Ghosh <brajeswar.linux@gmail.com>,
	Souptick Joarder <jrdr.linux@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Michael Petlan <mpetlan@redhat.com>,
	Song Liu <songliubraving@fb.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/3] perf tests bp_account: Add dedicated checking helper is_supported()
Date: Fri, 18 Oct 2019 14:57:21 -0300	[thread overview]
Message-ID: <20191018175721.GB1797@kernel.org> (raw)
In-Reply-To: <20191018085531.6348-2-leo.yan@linaro.org>

Em Fri, Oct 18, 2019 at 04:55:30PM +0800, Leo Yan escreveu:
> Arm architecture supports the 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.

Looks sensible,

Applied, thanks.

- Arnaldo
 
> Signed-off-by: Leo Yan <leo.yan@linaro.org>
> ---
>  tools/perf/tests/bp_account.c   | 16 ++++++++++++++++
>  tools/perf/tests/builtin-test.c |  2 +-
>  tools/perf/tests/tests.h        |  1 +
>  3 files changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/tests/bp_account.c b/tools/perf/tests/bp_account.c
> index 52ff7a462670..d0b935356274 100644
> --- a/tools/perf/tests/bp_account.c
> +++ b/tools/perf/tests/bp_account.c
> @@ -188,3 +188,19 @@ int test__bp_accounting(struct test *test __maybe_unused, int subtest __maybe_un
>  
>  	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
> +}
> diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
> index 55774baffc2a..8b286e9b7549 100644
> --- a/tools/perf/tests/builtin-test.c
> +++ b/tools/perf/tests/builtin-test.c
> @@ -121,7 +121,7 @@ static struct test generic_tests[] = {
>  	{
>  		.desc = "Breakpoint accounting",
>  		.func = test__bp_accounting,
> -		.is_supported = test__bp_signal_is_supported,
> +		.is_supported = test__bp_account_is_supported,
>  	},
>  	{
>  		.desc = "Watchpoint",
> diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h
> index 72912eb473cb..9837b6e93023 100644
> --- a/tools/perf/tests/tests.h
> +++ b/tools/perf/tests/tests.h
> @@ -111,6 +111,7 @@ int test__map_groups__merge_in(struct test *t, int subtest);
>  int test__time_utils(struct test *t, int subtest);
>  
>  bool test__bp_signal_is_supported(void);
> +bool test__bp_account_is_supported(void);
>  bool test__wp_is_supported(void);
>  
>  #if defined(__arm__) || defined(__aarch64__)
> -- 
> 2.17.1

-- 

- Arnaldo

  reply	other threads:[~2019-10-18 17:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18  8:55 [PATCH v1 1/3] perf tests: Remove needless headers for bp_account Leo Yan
2019-10-18  8:55 ` [PATCH v1 2/3] perf tests bp_account: Add dedicated checking helper is_supported() Leo Yan
2019-10-18 17:57   ` Arnaldo Carvalho de Melo [this message]
2019-10-21 23:18   ` [tip: perf/core] " tip-bot2 for Leo Yan
2019-10-18  8:55 ` [PATCH v1 3/3] perf tests: Disable bp_signal testing for arm64 Leo Yan
2019-10-18 17:59   ` Arnaldo Carvalho de Melo
2019-10-21  7:53     ` Leo Yan
2019-10-21 23:18   ` [tip: perf/core] " tip-bot2 for Leo Yan
2019-10-22 13:14     ` Will Deacon
2019-10-22 13:43       ` Leo Yan
2019-10-18 17:55 ` [PATCH v1 1/3] perf tests: Remove needless headers for bp_account Arnaldo Carvalho de Melo
2019-10-21 23:18 ` [tip: perf/core] " tip-bot2 for Leo Yan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191018175721.GB1797@kernel.org \
    --to=arnaldo.melo@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=brajeswar.linux@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=jrdr.linux@gmail.com \
    --cc=leo.yan@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=mpetlan@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=songliubraving@fb.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).