lists.openwall.net   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:   Thu, 22 Jul 2021 11:28:23 +0100
From:   John Garry <john.garry@...wei.com>
To:     Jin Yao <yao.jin@...ux.intel.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

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.

Thanks,
John

Powered by blists - more mailing lists