[PATCH v2 2/2] perf tsc: Declare TSC support from the build system
Paul Walmsley
pjw at kernel.org
Wed Oct 7 08:31:36 PDT 2026
On Tue, 6 Oct 2026, Adrian Hunter wrote:
> On 29/09/2026 06:41, Chen Pei wrote:
> > The "TSC support" subtest of the "Convert perf time to TSC" test decides
> > whether the architecture is covered by matching compiler macros for
> > x86_64, i386 and arm64. That list has to be edited for every new
> > architecture and can drift apart from the set of architectures that really
> > provide a counter.
> >
> > Declare the capability where the implementation is, following the
> > PERF_HAVE_JITDUMP pattern: an architecture with a usable counter sets
> > PERF_HAVE_RDTSC in its arch Makefile, Makefile.config turns it into
> > -DHAVE_RDTSC, and the test keys off that.
> >
> > x86 and arm64 keep the same behaviour, riscv starts running the subtest
> > where the previous patch defines rdtsc().
> >
> > Signed-off-by: Chen Pei <cp0613 at linux.alibaba.com>
>
> One minor style comment below. In any case:
>
> Reviewed-by: Adrian Hunter <adrian.hunter at intel.com>
Reviewed-by: Paul Walmsley <pjw at kernel.org>
- Paul
More information about the linux-riscv
mailing list