From: Ravi Bangoria <ravi.bangoria@amd.com>
To: James Clark <james.clark@arm.com>, Ian Rogers <irogers@google.com>
Cc: John Garry <john.g.garry@oracle.com>,
Will Deacon <will@kernel.org>, Leo Yan <leo.yan@linaro.org>,
Mike Leach <mike.leach@linaro.org>,
Kan Liang <kan.liang@linux.intel.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Athira Rajeev <atrajeev@linux.vnet.ibm.com>,
linux-perf-users <linux-perf-users@vger.kernel.org>,
Thomas Richter <tmricht@linux.ibm.com>,
Namhyung Kim <namhyung@gmail.com>,
Ravi Bangoria <ravi.bangoria@amd.com>
Subject: Re: perf-tools-next: Request for testing hybrid changes
Date: Tue, 4 Jul 2023 18:03:02 +0530 [thread overview]
Message-ID: <cc134bea-dbe3-cf41-4769-440b8c69e9b4@amd.com> (raw)
In-Reply-To: <6310725b-cc30-49e4-d405-ed2d5f31b404@arm.com>
>> For heterogeneous ARM PMUs I believe this is exactly the path taken to
>> cause the perf_event_open to fail. The resolution is to add the bit to
>> the PMU's capabilities. I believe doing it here will suffice:
>> https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/tree/drivers/perf/arm_pmu.c?h=perf/core#n877
>> So:
>> ```
>> .capabilities = PERF_PMU_CAP_HETEROGENEOUS_CPUS | PERF_PMU_CAP_EXTENDED_REGS,
>> ```
>> becomes:
>> ```
>> .capabilities = PERF_PMU_CAP_HETEROGENEOUS_CPUS |
>> PERF_PMU_CAP_EXTENDED_REGS | PERF_PMU_CAP_EXTENDED_HW_TYPE,
>> ```
>> Now strictly speaking you only need this in the case of heterogeneous
>> PMUs, but that's the case for other bits here and I don't see special
>> case logic...
>>
>
> Hi Ian,
>
> I tested the above and it seems to work fine on Arm so I will send it
> shortly. Some of the legacy perf stat use cases are working better with
> it so it makes sense to me. I also don't see a reason to not always do
> it even for homogeneous PMUs. To be honest I don't see a reason not to
> remove it as a capability and have it as the default behaviour
> everywhere? It all happens in the core code so I'm not sure adding it
> per PMU device is necessary, but maybe there is a reason?
EventSelect on AMD is 12 bits where upper nibble is passed via config[35:32].
i.e. it conflicts with the semantics of PERF_PMU_CAP_EXTENDED_HW_TYPE. So,
please don't make it default :)
Thanks,
Ravi
next prev parent reply other threads:[~2023-07-04 12:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-22 18:57 perf-tools-next: Request for testing hybrid changes Namhyung Kim
2023-06-22 20:15 ` Ian Rogers
2023-06-23 8:42 ` James Clark
2023-06-23 14:30 ` Ian Rogers
2023-06-23 17:59 ` Ian Rogers
2023-06-26 12:32 ` Will Deacon
2023-06-26 14:39 ` James Clark
2023-06-26 15:09 ` Will Deacon
2023-06-26 16:11 ` Ian Rogers
2023-06-29 11:13 ` James Clark
2023-06-30 15:30 ` Ian Rogers
2023-06-30 16:14 ` James Clark
2023-06-30 16:45 ` Ian Rogers
2023-07-04 11:30 ` James Clark
2023-07-04 12:33 ` Ravi Bangoria [this message]
2023-07-04 12:44 ` James Clark
2023-07-04 14:47 ` Ravi Bangoria
2023-07-04 17:59 ` Ian Rogers
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=cc134bea-dbe3-cf41-4769-440b8c69e9b4@amd.com \
--to=ravi.bangoria@amd.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=atrajeev@linux.vnet.ibm.com \
--cc=irogers@google.com \
--cc=james.clark@arm.com \
--cc=john.g.garry@oracle.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=leo.yan@linaro.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mike.leach@linaro.org \
--cc=namhyung@gmail.com \
--cc=tmricht@linux.ibm.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;
as well as URLs for NNTP newsgroup(s).