From: James Clark <james.clark@linaro.org>
To: Ian Rogers <irogers@google.com>, Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Kan Liang <kan.liang@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 1/3] perf test: Support arch-specific shell tests
Date: Fri, 23 May 2025 11:48:26 +0100 [thread overview]
Message-ID: <4763aca8-a140-4291-b12e-e03cc0d82bdd@linaro.org> (raw)
In-Reply-To: <CAP-5=fXDaKueO9HE-Gr3Q7R6qm2EjwnL845nh7R2OU+DCfrhyA@mail.gmail.com>
On 22/05/2025 9:09 pm, Ian Rogers wrote:
> On Thu, May 22, 2025 at 10:10 AM Namhyung Kim <namhyung@kernel.org> wrote:
>>
>> This is a preparation for shell tests belong to an arch.
>
> I keep repeating that I don't like arch and I think ideally we'd be
> getting rid of the C arch tests. I just sent out a patch doing this
> for 1 test:
> https://lore.kernel.org/lkml/20250521165317.713463-2-irogers@google.com/
> We should be able to make perf, tests, etc. dependent on a PMU rather
> than an architecture. This means that running perf built for ARM will
> be able to do things running on an instruction emulator on x86. It
In this case for Arm SPE and Coresight you can only generate trace by
running on a full model or a real CPU, so I'm not sure if we could ever
get close to running on just an emulator.
> means the tool, the kernel APIs, etc. are generic and new
> architectures like RISC-V can test things. It means cross-platform
> (record on 1 machine type, report on another) can work without
> tripping over load bearing architecture ifdefs. It means that we
I have thought about adding some generic decoding side tests for SPE and
Coresight, but couldn't really get past the fact that you need to put
the trace dump _and_ the binaries traced into the git repo. Not only
would this benefit testing on other arches like you say, but it would
also lock down that decoding of a known file doesn't regress which we
can't currently do by generating new trace every time the test runs.
If we ever added this they would be separate tests though so they could
go in the top level folder, where the ones in the arch folder would
continue to do record and decode. Maybe naming the folders by PMU could
work, but you could also have both PMU name and arch name folders like:
Recording/requires hardware:
tools/perf/arch/arm64/tests/shell/cs_etm/
Cross platform decode tests:
tools/perf/tests/shell/cs_etm/
Which would mirror how the source files are currently laid out:
tools/perf/arch/arm/util/cs-etm.c
tools/perf/util/cs-etm.c
Thanks
James
> benefit from more testing on generic pieces of code on all
> architectures - like sample parsing. We can always strcmp the PMU name
> or the architecture at runtime.
>
> Structure wise we could have:
> tools/perf/pmu/ibs_op/tests/
> tools/perf/pmu/ibs_op/tests/shell
>
> It feels noisy compared to just having the shell test in
> tools/perf/tests/shell skip when the PMU isn't present. There are also
> things like library dependencies that aren't clear when we have >1
> directory. I'd prefer if new testing followed the existing model
> rather than this.
>
> Thanks,
> Ian
>
next prev parent reply other threads:[~2025-05-23 10:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 17:10 Namhyung Kim
2025-05-22 17:10 ` [PATCH 2/3] perf test: Move some ARM tests to arch/arm64/tests/shell Namhyung Kim
2025-05-23 10:30 ` James Clark
2025-05-22 17:10 ` [PATCH 3/3] perf test: Add AMD IBS sw filter test Namhyung Kim
2025-05-22 20:09 ` [PATCH 1/3] perf test: Support arch-specific shell tests Ian Rogers
2025-05-23 10:48 ` James Clark [this message]
2025-05-23 16:50 ` Arnaldo Carvalho de Melo
2025-05-23 21:36 ` Namhyung Kim
2025-05-23 17:54 ` Ian Rogers
2025-05-23 21:33 ` Namhyung Kim
2025-05-23 10:05 ` James Clark
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=4763aca8-a140-4291-b12e-e03cc0d82bdd@linaro.org \
--to=james.clark@linaro.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®