[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6b9fb1dc-5f53-d378-9119-84e991a0c86e@linux.intel.com>
Date: Fri, 23 Jul 2021 14:56:15 +0800
From: "Jin, Yao" <yao.jin@...ux.intel.com>
To: John Garry <john.garry@...wei.com>, acme@...nel.org,
jolsa@...nel.org, peterz@...radead.org, mingo@...hat.com,
alexander.shishkin@...ux.intel.com
Cc: Linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
ak@...ux.intel.com, kan.liang@...el.com, yao.jin@...el.com,
Kan Liang <kan.liang@...ux.intel.com>
Subject: Re: [PATCH v1] perf pmu: Add PMU alias support
Hi John,
On 7/22/2021 6:28 PM, John Garry wrote:
> On 22/07/2021 02:45, Jin Yao wrote:
>> From: Kan Liang<kan.liang@...ux.intel.com>
>>
>> A perf uncore PMU may have two PMU names, a real name and an alias. The
>> alias is exported at /sys/bus/event_source/devices/uncore_*/alias.
>> The perf tool should support the alias as well.
>>
>> Add alias_name in the struct perf_pmu to store the alias. For the PMU
>> which doesn't have an alias. It's NULL.
>>
>> Introduce two X86 specific functions to retrieve the real name and the
>> alias separately.
>>
>> Only go through the sysfs to retrieve the mapping between the real name
>> and the alias once. The result is cached in a list, uncore_pmu_list.
>>
>> Nothing changed for the other ARCHs.
>>
>> With the patch, the perf tool can monitor the PMU with either the real
>> name or the alias.
>>
>> Use the real name,
>> $ perf stat -e uncore_cha_2/event=1/ -x,
>> 4044879584,,uncore_cha_2/event=1/,2528059205,100.00,,
>>
>> Use the alias,
>> $ perf stat -e uncore_type_0_2/event=1/ -x,
>> 3659675336,,uncore_type_0_2/event=1/,2287306455,100.00,,
>
> Having a self-test case would be nice. And it's questionable why this goes in x86 code.
>
OK, I will add test cases for uncore PMU alias.
For why it's now only x86 specific code, my understanding is, currently x86 has this usage case, we
can further extend it to other ARCHs and make it a generic way in future.
Thanks
Jin Yao
> Thanks,
> John
Powered by blists - more mailing lists