mirror of https://lore.kernel.org/lkml/
 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>,
	James Clark <james.clark@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Mike Leach <mike.leach@linaro.org>,
	John Garry <john.g.garry@oracle.com>,
	Will Deacon <will@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	"Liang, Kan" <kan.liang@linux.intel.com>,
	Kajol Jain <kjain@linux.ibm.com>,
	coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/2] perf arm-spe: Support multiple Arm SPE PMUs
Date: Tue, 25 Jun 2024 17:49:16 +0100	[thread overview]
Message-ID: <86fd1484-7b9a-4da3-8e1d-91e5881df832@arm.com> (raw)
In-Reply-To: <CAP-5=fWgGR-L6V5RNNpTHdHyT0wTOqKd3CQ8xQSQDAJ1D2edYA@mail.gmail.com>

Hi Ian,

On 6/24/24 17:16, Ian Rogers wrote:
> On Sun, Jun 23, 2024 at 6:34 AM Leo Yan <leo.yan@arm.com> wrote:
>>
>> A platform can have more than one Arm SPE PMU. For example, a system
>> with multiple clusters may have each cluster enabled with its own Arm
>> SPE instance. In such case, the PMU devices will be named 'arm_spe_0',
>> 'arm_spe_1', and so on.
>>
>> Currently, the tool only supports 'arm_spe_0'. This commit extends
>> support to multiple Arm SPE PMUs by detecting the substring 'arm_spe'.
>>
>> Signed-off-by: Leo Yan <leo.yan@arm.com>
>> ---
>>   tools/perf/arch/arm/util/pmu.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/perf/arch/arm/util/pmu.c b/tools/perf/arch/arm/util/pmu.c
>> index 8b7cb68ba1a8..29cfa1e427ed 100644
>> --- a/tools/perf/arch/arm/util/pmu.c
>> +++ b/tools/perf/arch/arm/util/pmu.c
>> @@ -27,7 +27,7 @@ void perf_pmu__arch_init(struct perf_pmu *pmu __maybe_unused)
>>                  pmu->selectable = true;
>>                  pmu->is_uncore = false;
>>                  pmu->perf_event_attr_init_default = arm_spe_pmu_default_config;
>> -               if (!strcmp(pmu->name, "arm_spe_0"))
>> +               if (strstr(pmu->name, "arm_spe"))
> 
> Why not use strstarts?

Indeed, strstarts() is better, will spin for this.

Thank for suggestion.
Leo

  reply	other threads:[~2024-06-25 16:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-23 13:34 [PATCH v1 0/2] perf mem: " Leo Yan
2024-06-23 13:34 ` [PATCH v1 1/2] perf arm-spe: " Leo Yan
2024-06-24 16:16   ` Ian Rogers
2024-06-25 16:49     ` Leo Yan [this message]
2024-06-27 22:37       ` Namhyung Kim
2024-06-23 13:34 ` [PATCH v1 2/2] perf mem: Warn if memory events are not supported on all CPUs Leo Yan
2024-06-24  9:55 ` [PATCH v1 0/2] perf mem: Support multiple Arm SPE PMUs 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=86fd1484-7b9a-4da3-8e1d-91e5881df832@arm.com \
    --to=leo.yan@arm.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=coresight@lists.linaro.org \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=john.g.garry@oracle.com \
    --cc=kan.liang@linux.intel.com \
    --cc=kjain@linux.ibm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mike.leach@linaro.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=suzuki.poulose@arm.com \
    --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 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®