The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Leo Yan <leo.yan@arm.com>
Cc: Ian Rogers <irogers@google.com>,
	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: Fri, 15 May 2026 08:51:22 -0300	[thread overview]
Message-ID: <agcIuroGWo0UrkVX@x1> (raw)
In-Reply-To: <20260513143705.GG34802@e132581.arm.com>

On Wed, May 13, 2026 at 03:37:05PM +0100, Leo Yan wrote:
> 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!

Thanks, applied to perf-tools-next, for v7.2.

- Arnaldo