Linux Perf Users
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@arm.com>
To: Ian Rogers <irogers@google.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	James Clark <james.clark@linaro.org>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] perf pmu: Skip test on Arm64 when #slots is zero
Date: Wed, 13 May 2026 15:37:05 +0100	[thread overview]
Message-ID: <20260513143705.GG34802@e132581.arm.com> (raw)
In-Reply-To: <CAP-5=fWEU5qqTHjisUyDJMQQB5yFibyogMwAerTs5VUF0OSPHA@mail.gmail.com>

On Wed, May 13, 2026 at 06:10:00AM -0700, Ian Rogers wrote:

[...]

> We get this failure for these metrics on x86 when building perf with
> JEVENTS_ARCH=all. Rather than expecting the parse failure perhaps we
> should just always return true in tool_pmu__read_event:
> https://web.git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/util/tool_pmu.c#n421

I considered returning true when slots == 0 so can mute parser error
and allow the test to pass. However, if so platforms which do not
support #slots would be able to use those metrics and generate
meaningless statistics.

I would keep the parser errors so this is a reminding when users wrongly
use unsupported metrics.

> I guess the problem there is that when these metrics are broken (no
> slots value) you can't distinguish this case from other valid cases.

IMO, this is a test design issue: tests should validate metrics while
remaining hardware-agnostic. Hardware-specific cases should either run
only on supported platforms, or the tests should be refined to run
transparently across different hardware.

> Reviewed-by: Ian Rogers <irogers@google.com>

Thanks for review!

Leo

      reply	other threads:[~2026-05-13 14:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10 11:13 [PATCH v2] perf pmu: Skip test on Arm64 when #slots is zero Leo Yan
2026-04-10 11:28 ` sashiko-bot
2026-04-10 14:09   ` Leo Yan
2026-04-21 14:20 ` James Clark
2026-05-13 12:52   ` Leo Yan
2026-05-13 13:10 ` Ian Rogers
2026-05-13 14:37   ` Leo Yan [this message]

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=20260513143705.GG34802@e132581.arm.com \
    --to=leo.yan@arm.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=namhyung@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