All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@arm.com>
To: Chen Pei <cp0613@linux.alibaba.com>
Cc: acme@kernel.org, peterz@infradead.org, mingo@redhat.com,
	namhyung@kernel.org, mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com, jolsa@kernel.org,
	irogers@google.com, adrian.hunter@intel.com,
	james.clark@linaro.org, leo.yan@linux.dev,
	john.g.garry@oracle.com, will@kernel.org, mike.leach@arm.com,
	pjw@kernel.org, palmer@dabbelt.com, guoren@kernel.org,
	linux-perf-users@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] perf tsc: Replace the compile-time TSC support check with a weak hook
Date: Mon, 28 Sep 2026 17:34:42 +0100	[thread overview]
Message-ID: <20260928163442.GG14479@e132581.arm.com> (raw)
In-Reply-To: <20260928094739.2605-3-cp0613@linux.alibaba.com>

On Mon, Sep 28, 2026 at 05:47:39PM +0800, Chen Pei wrote:

[...]

> Add a weak arch__rdtsc_supported() next to the weak rdtsc(), let the
> test query it instead of the macros, and have x86, arm64 and riscv
> override it in the file where they implement rdtsc().

The patch itself is fine for me.

Just a bit on refactoring. You could refer to the implementation of
PERF_HAVE_JITDUMP in arch Makefile and "CFLAGS += -DHAVE_JITDUMP" and
do similiar thing for rdtsc.

Seems to me, we can just use build system for configurations.

Thanks,
Leo

WARNING: multiple messages have this Message-ID (diff)
From: Leo Yan <leo.yan@arm.com>
To: Chen Pei <cp0613@linux.alibaba.com>
Cc: acme@kernel.org, peterz@infradead.org, mingo@redhat.com,
	namhyung@kernel.org, mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com, jolsa@kernel.org,
	irogers@google.com, adrian.hunter@intel.com,
	james.clark@linaro.org, leo.yan@linux.dev,
	john.g.garry@oracle.com, will@kernel.org, mike.leach@arm.com,
	pjw@kernel.org, palmer@dabbelt.com, guoren@kernel.org,
	linux-perf-users@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] perf tsc: Replace the compile-time TSC support check with a weak hook
Date: Mon, 28 Sep 2026 17:34:42 +0100	[thread overview]
Message-ID: <20260928163442.GG14479@e132581.arm.com> (raw)
In-Reply-To: <20260928094739.2605-3-cp0613@linux.alibaba.com>

On Mon, Sep 28, 2026 at 05:47:39PM +0800, Chen Pei wrote:

[...]

> Add a weak arch__rdtsc_supported() next to the weak rdtsc(), let the
> test query it instead of the macros, and have x86, arm64 and riscv
> override it in the file where they implement rdtsc().

The patch itself is fine for me.

Just a bit on refactoring. You could refer to the implementation of
PERF_HAVE_JITDUMP in arch Makefile and "CFLAGS += -DHAVE_JITDUMP" and
do similiar thing for rdtsc.

Seems to me, we can just use build system for configurations.

Thanks,
Leo

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2026-09-28 16:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28  9:47 [PATCH 0/2] perf riscv: Implement rdtsc() Chen Pei
2026-09-28  9:47 ` Chen Pei
2026-09-28  9:47 ` [PATCH 1/2] " Chen Pei
2026-09-28  9:47   ` Chen Pei
2026-09-28  9:54   ` sashiko-bot
2026-09-28 13:42   ` Anup Patel
2026-09-28 13:42     ` Anup Patel
2026-09-28  9:47 ` [PATCH 2/2] perf tsc: Replace the compile-time TSC support check with a weak hook Chen Pei
2026-09-28  9:47   ` Chen Pei
2026-09-28  9:55   ` sashiko-bot
2026-09-28 13:42   ` Anup Patel
2026-09-28 13:42     ` Anup Patel
2026-09-28 16:34   ` Leo Yan [this message]
2026-09-28 16:34     ` Leo Yan
2026-09-29  3:40     ` Chen Pei
2026-09-29  3:40       ` Chen Pei
2026-09-29  8:28   ` David Laight
2026-09-29  8:28     ` David Laight
2026-09-29  9:08     ` Chen Pei
2026-09-29  9:08       ` Chen Pei

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=20260928163442.GG14479@e132581.arm.com \
    --to=leo.yan@arm.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=cp0613@linux.alibaba.com \
    --cc=guoren@kernel.org \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=john.g.garry@oracle.com \
    --cc=jolsa@kernel.org \
    --cc=leo.yan@linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=mike.leach@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=peterz@infradead.org \
    --cc=pjw@kernel.org \
    --cc=will@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 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.