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  linux-cve-announce  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]
Message-ID: <bd25fae8-c78d-3c42-01e3-c7d9237ce50c@arm.com>
Date:   Tue, 21 Dec 2021 14:31:54 +0000
From:   Andrew Kilroy <andrew.kilroy@....com>
To:     John Garry <john.garry@...wei.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>,
        "acme@...nel.org" <acme@...nel.org>,
        Andi Kleen <ak@...ux.intel.com>
Cc:     Will Deacon <will@...nel.org>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        Leo Yan <leo.yan@...aro.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [RFC PATCH 1/1] perf arm64: Implement --topdown with metrics



On 17/12/2021 10:19, John Garry wrote:
> On 14/12/2021 18:42, Andrew Kilroy wrote:
>> This patch implements the --topdown option by making use of metrics to
>> dictate what counters are obtained in order to show the various topdown
>> columns, e.g.  Frontend Bound, Backend Bound, Retiring and Bad
>> Speculation.
>>
>> The MetricGroup name is used to identify which set of metrics are to be
>> shown.  For the moment use TopDownL1 and enable for arm64
>>
>> Signed-off-by: Andrew Kilroy<andrew.kilroy@....com>
> 
> This works in that it gives results, but does not supply the same output 
> format as for x86 nor has same restrictions in usage (-a commandline 
> required, for example, below).
> 
> For my x86 broadwell:
> 
> john@...alhost:~/linux/tools/perf> sudo ./perf stat --topdown  sleep 1
> top down event configuration requires system-wide mode (-a)
> 
> john@...alhost:~/linux/tools/perf> sudo ./perf stat --topdown -a sleep 1
> Performance counter stats for 'system wide':
> 
>                                     retiring      bad speculation 
> frontend bound        backend bound
> S0-D0-C0           2                29.2%                 6.3%      
> 37.4%                27.1%
> S0-D0-C1           2                20.4%                 6.2%      
> 42.1%                31.3%
> 
>        0.998007338 seconds time elapsed
> 
> john@...alhost:~/linux/tools/perf>
> 

Judging by comments in commits 44b1e60ab576c, 55c36a9fc2aaa, whether -a 
is required or not differs depending on the cpu.  As to why, I'm not 
sure.  The requirement was relaxed in 55c36a9fc2aaa, but I guess that 
doesn't affect the broadwell.

The stats are printed per cpu because on your broadwell, the existing 
code is forcing per-core mode.  Hence why -a is required.  See 
builtin-stat.c lines 1885-1890 on commit 8ff4f20f3eb55.

My patch wasn't forcing per-core, hence it didn't require -a.


Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ