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: <CAP-5=fW3eY70Vh_GuTVB=M2MFcpe-WqRy76cK++UMYT5OKMtLg@mail.gmail.com>
Date: Thu, 6 Feb 2025 11:05:11 -0800
From: Ian Rogers <irogers@...gle.com>
To: "Liang, Kan" <kan.liang@...ux.intel.com>
Cc: Thomas Falcon <thomas.falcon@...el.com>, Peter Zijlstra <peterz@...radead.org>, 
	Ingo Molnar <mingo@...hat.com>, Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>, 
	Mark Rutland <mark.rutland@....com>, 
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>, 
	Adrian Hunter <adrian.hunter@...el.com>, Andreas Färber <afaerber@...e.de>, 
	Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>, Weilin Wang <weilin.wang@...el.com>, 
	linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org, 
	Perry Taylor <perry.taylor@...el.com>, Samantha Alt <samantha.alt@...el.com>, 
	Caleb Biggers <caleb.biggers@...el.com>, Edward Baker <edward.baker@...el.com>, 
	Michael Petlan <mpetlan@...hat.com>
Subject: Re: [PATCH v5 11/24] perf vendor events: Update/add Graniterapids events/metrics

On Thu, Feb 6, 2025 at 10:59 AM Liang, Kan <kan.liang@...ux.intel.com> wrote:
>
> On 2025-02-06 1:53 p.m., Liang, Kan wrote:
> >>> However, when I dump the debug information,
> >>> ./perf stat -M tma_frontend_bound -vvv
> >>>
> >>> I got below debug information. I have no idea where the slot is from.
> >>> It seems the perf code mess up the p-core metrics with the e-core
> >>> metrics. But why only slot?
> >>> It seems a bug of perf tool.
> >>>
> >>> found event cpu_atom@..._CLK_UNHALTED.CORE@
> >>> found event cpu_atom@...DOWN_FE_BOUND.ALL@
> >>> found event slots
> >>> Parsing metric events
> >>>
> >>> '{cpu_atom/CPU_CLK_UNHALTED.CORE,metric-id=cpu_atom!3CPU_CLK_UNHALTED.CORE!3/,cpu_atom/TOPDOWN_FE_BOUND.ALL,metric-id=cpu_atom!3TOPDOWN_FE_BOUND.ALL!3/,slots/metric-id=slots/}:W'
> > It because the perf adds "slot" as a tool event for the e-core Topdown
> > metrics.
> > There is no "slot" event for e-core.
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/
> > tools/perf/util/metricgroup.c#n1481
> >
> > I will check why "slot" event is added as a tool event for e-core?
> > That doesn't make sense.
>
>
> BTW: I checked the list of the tool events. Except the slots, others are
> all SW (or non-HW) events which should always be available.
> Slots is a HW event and only be available for p-core.
> It doesn't look like a good fit here.
>
> static const char *const tool_pmu__event_names[TOOL_PMU__EVENT_MAX] = {
>         NULL,
>         "duration_time",
>         "user_time",
>         "system_time",
>         "has_pmem",
>         "num_cores",
>         "num_cpus",
>         "num_cpus_online",
>         "num_dies",
>         "num_packages",
>         "slots",
>         "smt_on",
>         "system_tsc_freq",
> };

IIRC it was added on metric changes I wasn't a reviewer on:
https://lore.kernel.org/r/1673940573-90503-2-git-send-email-renyu.zj@linux.alibaba.com
and then carried forward by me. The event should only be enabled on aarch64:
https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/util/tool_pmu.c?h=perf-tools-next#n38
Where is the slots event added to the metric expr (expression) string?
The metric should have events pulled out, parsed and
parse_events__sort_events_and_fix_groups deal with related issues to
this. I thought it was a requirement that the slots be in the metric -
or else why is the converter script injecting them? :-)

Thanks,
Ian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ