All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Rogers <irogers@google.com>
To: 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>,
	John Garry <john.garry@huawei.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Cc: Stephane Eranian <eranian@google.com>, Ian Rogers <irogers@google.com>
Subject: [PATCH 01/26] perf test: Allow skip for all metrics test
Date: Sat, 29 Jan 2022 00:09:04 -0800	[thread overview]
Message-ID: <20220129080929.837293-2-irogers@google.com> (raw)
In-Reply-To: <20220129080929.837293-1-irogers@google.com>

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.

Signed-off-by: Ian Rogers <irogers@google.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"
-- 
2.35.0.rc2.247.g8bbb082509-goog


  reply	other threads:[~2022-01-29  8:09 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-29  8:09 [PATCH 00/26] Update Intel events and metrics Ian Rogers
2022-01-29  8:09 ` Ian Rogers [this message]
2022-01-29  8:09 ` [PATCH 02/26] perf vendor events: Update metrics for SkyLake Server Ian Rogers
2022-01-29  8:09 ` [PATCH 03/26] perf vendor events: Update metrics for Broadwell DE Ian Rogers
2022-01-31 13:53   ` Liang, Kan
2022-01-31 18:59     ` Ian Rogers
2022-01-29  8:09 ` [PATCH 04/26] perf vendor events: Update metrics for CascadelakeX Ian Rogers
2022-01-29  8:09 ` [PATCH 05/26] perf vendor events: Update metrics for HaswellX Ian Rogers
2022-01-29  8:09 ` [PATCH 06/26] perf vendor events: Update metrics for Ivybridge Ian Rogers
2022-01-29  8:09 ` [PATCH 07/26] perf vendor events: Update for Westmere EP-DP Ian Rogers
2022-01-29  8:09 ` [PATCH 08/26] perf vendor events: Update metrics for IcelakeX Ian Rogers
2022-01-29  8:09 ` [PATCH 09/26] perf vendor events: Update for Bonnell Ian Rogers
2022-01-29  8:09 ` [PATCH 10/26] perf vendor events: Update metrics for Broadwell Ian Rogers
2022-01-29  8:09 ` [PATCH 11/26] perf vendor events: Update metrics for BroadwellX Ian Rogers
2022-01-29  8:09 ` [PATCH 12/26] perf vendor events: Update for Goldmont Ian Rogers
2022-01-29  8:09 ` [PATCH 13/26] perf vendor events: Update for GoldmontPlus Ian Rogers
2022-01-29  8:09 ` [PATCH 14/26] perf vendor events: Update metrics for Haswell Ian Rogers
2022-01-29  8:09 ` [PATCH 15/26] perf vendor events: Update metrics for Icelake Ian Rogers
2022-01-29  8:09 ` [PATCH 16/26] perf vendor events: Update metrics for Ivytown Ian Rogers
2022-01-29  8:09 ` [PATCH 17/26] perf vendor events: Update metrics for Jaketown Ian Rogers
2022-01-29  8:09 ` [PATCH 18/26] perf vendor events: Update Knights Landing Ian Rogers
2022-01-29  8:09 ` [PATCH 19/26] perf vendor events: Update Nehalem EP Ian Rogers
2022-01-29  8:09 ` [PATCH 20/26] perf vendor events: Update metrics for Skylake Ian Rogers
2022-01-29  8:09 ` [PATCH 21/26] perf vendor events: Update Sandybridge Ian Rogers
2022-01-29  8:09 ` [PATCH 22/26] perf vendor events: Update Silvermont Ian Rogers
2022-01-29  8:09 ` [PATCH 23/26] perf vendor events: Update Tigerlake Ian Rogers
2022-01-29  8:09 ` [PATCH 24/26] perf vendor events: Update Westmere EP-SP Ian Rogers
2022-01-29  8:09 ` [PATCH 25/26] perf vendor events: Update Westmere EX Ian Rogers
2022-01-29  8:09 ` [PATCH 26/26] perf vendor events: Update TremontX Ian Rogers
2022-01-31 14:04 ` [PATCH 00/26] Update Intel events and metrics Liang, Kan

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=20220129080929.837293-2-irogers@google.com \
    --to=irogers@google.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=james.clark@arm.com \
    --cc=john.garry@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.