From: John Garry <john.garry@huawei.com>
To: Ian Rogers <irogers@google.com>,
Kan Liang <kan.liang@linux.intel.com>,
Zhengjun Xing <zhengjun.xing@linux.intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
"Arnaldo Carvalho de Melo" <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Andi Kleen <ak@linux.intel.com>,
James Clark <james.clark@arm.com>, <linux-kernel@vger.kernel.org>,
<linux-perf-users@vger.kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH v2 01/26] perf test: Allow skip for all metrics test
Date: Tue, 1 Feb 2022 10:39:02 +0000 [thread overview]
Message-ID: <566a72ee-b46f-4ee2-93dd-9a12723f969f@huawei.com> (raw)
In-Reply-To: <20220201015858.1226914-2-irogers@google.com>
On 01/02/2022 01:58, Ian Rogers wrote:
nit: the subject is a bit ambiguous, as it implies skipping all the
tests, when we just may skip some now
> Some Intel TMA metrics compute a ratio that may divide by 0, which
> causes the metric not to print. This happens for metrics with FP_ARITH
> events. If we see these events in the result and would otherwise fail,
> then switch to a skip.
> Also, don't early exit when processing metrics.
>
> Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
> Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: John Garry <john.garry@huawei.com>
> ---
> tools/perf/tests/shell/stat_all_metrics.sh | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/tests/shell/stat_all_metrics.sh b/tools/perf/tests/shell/stat_all_metrics.sh
> index 7f4ba3cad632..e7c59e5a7a98 100755
> --- a/tools/perf/tests/shell/stat_all_metrics.sh
> +++ b/tools/perf/tests/shell/stat_all_metrics.sh
> @@ -4,6 +4,7 @@
>
> set -e
>
> +err=0
> for m in $(perf list --raw-dump metrics); do
> echo "Testing $m"
> result=$(perf stat -M "$m" true 2>&1)
> @@ -14,9 +15,14 @@ for m in $(perf list --raw-dump metrics); do
> if [[ ! "$result" =~ "$m" ]]; then
> echo "Metric '$m' not printed in:"
> echo "$result"
> - exit 1
> + if [[ "$result" =~ "FP_ARITH" && "$err" != "1" ]]; then
> + echo "Skip, not fail, for FP issues"
> + err=2
> + else
> + err=1
> + fi
> fi
> fi
> done
>
> -exit 0
> +exit "$err"
>
next prev parent reply other threads:[~2022-02-01 10:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-01 1:58 [PATCH v2 00/26] Update Intel events and metrics Ian Rogers
2022-02-01 1:58 ` [PATCH v2 01/26] perf test: Allow skip for all metrics test Ian Rogers
2022-02-01 10:39 ` John Garry [this message]
2022-02-01 1:58 ` [PATCH v2 23/26] perf vendor events: Update Tigerlake Ian Rogers
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=566a72ee-b46f-4ee2-93dd-9a12723f969f@huawei.com \
--to=john.garry@huawei.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=alexandre.torgue@foss.st.com \
--cc=eranian@google.com \
--cc=irogers@google.com \
--cc=james.clark@arm.com \
--cc=jolsa@redhat.com \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=zhengjun.xing@linux.intel.com \
/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).