lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 23 Jul 2021 14:56:15 +0800
From:   "Jin, Yao" <>
To:     John Garry <>,,,,,
        Kan Liang <>
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<>
>> 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.

Jin Yao

> Thanks,
> John

Powered by blists - more mailing lists