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] [day] [month] [year] [list]
Date:   Mon, 11 Dec 2023 13:25:21 -0800
From:   Ian Rogers <irogers@...gle.com>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     "Liang, Kan" <kan.liang@...ux.intel.com>,
        Mark Rutland <mark.rutland@....com>,
        Marc Zyngier <maz@...nel.org>,
        Hector Martin <marcan@...can.st>,
        Namhyung Kim <namhyung@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-perf-users@...r.kernel.org
Subject: Re: 'perf top' broken on intel hybrid systems

On Mon, Dec 11, 2023 at 1:11 PM Arnaldo Carvalho de Melo
<acme@...nel.org> wrote:
>
> Em Fri, Dec 08, 2023 at 02:39:37PM -0500, Liang, Kan escreveu:
> > On 2023-12-08 1:57 p.m., Arnaldo Carvalho de Melo wrote:
> > >     So I finally got a recent Intel hybrid system:
> > > root@...ora:~# grep -m1 "model name" /proc/cpuinfo
> > > model name  : Intel(R) Core(TM) i7-14700K
> > > root@...ora:~#
> > >     Most things work, but:
>
> > > root@...ora:~# perf top
>
> > > Error:
> > > The cycles:P event is not supported.
> > > root@...ora:~#
> > >
> > > root@...ora:~# perf top -e cycles:p
> > > Error:
> > > The cycles:p event is not supported.
> > > root@...ora:~# perf top -e cycles:pp
> > > Error:
> > > The cycles:pp event is not supported.
> > > ^[[Aroot@...ora:~# perf top -e cycles:ppp
> > > Error:
> > > The cycles:ppp event is not supported.
> > > root@...ora:~#
> > > root@...ora:~# perf top -e cycles
> > > Error:
> > > The cycles event is not supported.
> > > root@...ora:~#
>
> > The error is because the perf top always tries to open an event on the
> > user_requested_cpus, which are all CPUs by default.
>
> But what is wrong with that for the default event, CPU cycles?
>
> It should work for all CPUs, its the most basic event, right?
>
> We should have a rough idea where CPU (no matter which CPUs) cycles are
> being used.

Generally we wouldn't want to aggregate cycles events on two differing
PMUs as the CPUs for them likely behave quite differently. Most of the
cycle event opening is now done by parsing "cycles:P" which will give
two evsels, one for each core PMU. You're right that the correct PMU
can be determined for the legacy events without an extended type if
the CPU isn't the -1 any CPU value. We'd need special parsing to make
this work in the context of perf top, which doesn't seem desirable. I
think we should support wild card PMUs and fix the CPU maps like we do
in perf stat and perf record.

Thanks,
Ian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ