From: "Liang, Kan" <kan.liang@linux.intel.com>
To: Ian Rogers <irogers@google.com>,
"Falcon, Thomas" <thomas.falcon@intel.com>
Cc: "Baker, Edward" <edward.baker@intel.com>,
"alexander.shishkin@linux.intel.com"
<alexander.shishkin@linux.intel.com>,
"Biggers, Caleb" <caleb.biggers@intel.com>,
"mpetlan@redhat.com" <mpetlan@redhat.com>,
"Taylor, Perry" <perry.taylor@intel.com>,
"Hunter, Adrian" <adrian.hunter@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"linux-perf-users@vger.kernel.org"
<linux-perf-users@vger.kernel.org>,
"manivannan.sadhasivam@linaro.org"
<manivannan.sadhasivam@linaro.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"Alt, Samantha" <samantha.alt@intel.com>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"Wang, Weilin" <weilin.wang@intel.com>,
"acme@kernel.org" <acme@kernel.org>,
"afaerber@suse.de" <afaerber@suse.de>,
"jolsa@kernel.org" <jolsa@kernel.org>,
"namhyung@kernel.org" <namhyung@kernel.org>
Subject: Re: [PATCH v4 00/23] Intel vendor events and TMA 5.01 metrics
Date: Wed, 5 Feb 2025 10:46:56 -0500 [thread overview]
Message-ID: <ca45ff5e-3d1a-4149-8efe-7615dd3581ff@linux.intel.com> (raw)
In-Reply-To: <CAP-5=fV8EcxVZR0Be6wb57_VvssE9FYFBTmbd415CqmidGWT7g@mail.gmail.com>
On 2025-02-04 11:58 p.m., Ian Rogers wrote:
> On Tue, Feb 4, 2025 at 8:28 PM Falcon, Thomas <thomas.falcon@intel.com> wrote:
>>
>> On Tue, 2025-02-04 at 13:35 -0800, Ian Rogers wrote:
>>> On Tue, Feb 4, 2025 at 1:33 PM Ian Rogers <irogers@google.com> wrote:
>>>>
>>>> Update the Intel vendor events to the latest.
>>>> Update the metrics to TMA 5.01.
>>>> Add Arrowlake and Clearwaterforest support.
>>>> Add metrics for LNL and GNR.
>>>> Address IIO uncore issue spotted on EMR, GRR, GNR, SPR and SRF.
>>>>
>>>> The perf json was generated using the script:
>>>> https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py
>>>> with the generated json being in:
>>>> https://github.com/intel/perfmon/tree/main/scripts/perf
>>>>
>>>> Thanks to Perry Taylor <perry.taylor@intel.com>, Caleb Biggers
>>>> <caleb.biggers@intel.com>, Edward Baker <edward.baker@intel.com>
>>>> and
>>>> Weilin Wang <weilin.wang@intel.com> for helping get this patch
>>>> series
>>>> together.
>>>>
>>>> v4: Fix TSC events on hybrid mistakenly specifying the core PMU
>>>> inhibiting the use of the msr PMU.
>>>> v3: Fixes for hybrid metrics that were missing PMU. Update to the
>>>> latest events.
>>>> v2: Fix hybrid and Co-authored-by tag issues reported by
>>>> Arnaldo. Updates to Lunarlake and Meteorlake events. Addition
>>>> of
>>>> Clearwaterforest.
>>>
>>> Sorry, forgot to add Thomas again.
>>> https://lore.kernel.org/lkml/20250204213259.127939-1-irogers@google.com/
>>
>> Hi, I'm seeing some warnings like this and the all metrics test is
>> skipped:
>>
>> Testing tma_info_inst_mix_iparith
>> FP issues
>> Cannot resolve IDs for tma_info_inst_mix_iparith:
>> cpu_core@INST_RETIRED.ANY@ / (cpu_core@FP_ARITH_INST_RETIRED.SCALAR@ +
>> cpu_core@FP_ARITH_INST_RETIRED.VECTOR@)
>> Testing tma_info_inst_mix_iparith_avx128
>> FP issues
>> Cannot resolve IDs for tma_info_inst_mix_iparith_avx128:
>> cpu_core@INST_RETIRED.ANY@ /
>> (cpu_core@FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE@ +
>> cpu_core@FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE@)
>> Testing tma_info_inst_mix_iparith_avx256
>> FP issues
>> Cannot resolve IDs for tma_info_inst_mix_iparith_avx256:
>> cpu_core@INST_RETIRED.ANY@ /
>> (cpu_core@FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE@ +
>> cpu_core@FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE@)
>> Testing tma_info_inst_mix_iparith_scalar_dp
>> FP issues
>> Cannot resolve IDs for tma_info_inst_mix_iparith_scalar_dp:
>> cpu_core@INST_RETIRED.ANY@ /
>> cpu_core@FP_ARITH_INST_RETIRED.SCALAR_DOUBLE@
>> Testing tma_info_inst_mix_iparith_scalar_sp
>> FP issues
>> Cannot resolve IDs for tma_info_inst_mix_iparith_scalar_sp:
>> cpu_core@INST_RETIRED.ANY@ /
>> cpu_core@FP_ARITH_INST_RETIRED.SCALAR_SINGLE@
>
> Thanks Tom, we've gone from a fail to skip - so progress! I think it
> actually isn't something to worry about. These metrics are measuring
> vector and floating point things. We run a workload, when testing the
> metrics, that doesn't have floating point and vector operations. This
> causes issues with metrics for these instructions as the counters
> don't count anything. Because of this I added some logic to just skip
> when we see these failures:
> https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/tests/shell/stat_all_metrics.sh?h=perf-tools-next#n51
> but a better fix would be to have a workload with FP and AMX operations.
>
> You could test these metrics work manually, by running something like:
> $ perf stat -M tma_info_inst_mix_iparith <benchmark>
> where <benchmark> would need to contain FP or AMX instructions.
>
It should be OK to skip the "FP issues", but the "Cannot resolve IDs"
seems a different issue.
I found the similar error when I run perf stat on my Arrow Lake machine.
$ sudo ./perf stat
Cannot resolve IDs for tma_memory_bound: topdown\-mem\-bound /
(topdown\-fe\-bound + topdown\-bad\-spec + topdown\-retiring +
topdown\-be\-bound) + 0 * slots
I think the warning is because perf doesn't find all the matched events.
https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/util/metricgroup.c?h=tmp.perf-tools-next#n326
Then I go to check the event list of tma_memory_bound.
For cpu_atom, it requires slots and topdown-mem-bound, which should be
only available on p-core.
+ {
+ "BriefDescription": "This metric represents fraction of slots
the Memory subsystem within the Backend was a bottleneck",
+ "DefaultMetricgroupName": "TopdownL2",
+ "MetricExpr": "topdown\\-mem\\-bound / (topdown\\-fe\\-bound +
topdown\\-bad\\-spec + topdown\\-retiring + topdown\\-be\\-bound) + 0 *
slots",
+ "MetricGroup":
"Backend;Default;Slots;TmaL2;TopdownL2;tma_L2_group;tma_backend_bound_group",
+ "MetricName": "tma_memory_bound",
+ "MetricThreshold": "tma_memory_bound > 0.2 & tma_backend_bound
> 0.2",
+ "MetricgroupNoGroup": "TopdownL2;Default",
+ "PublicDescription": "This metric represents fraction of slots
the Memory subsystem within the Backend was a bottleneck. Memory Bound
estimates fraction of slots where pipeline is likely stalled due to
demand load or store instructions. This accounts mainly for (1)
non-completed in-flight memory demand loads which coincides with
execution units starvation; in addition to (2) cases where stores could
impose backpressure on the pipeline when many of them get buffered at
the same time (less common out of the two)",
+ "ScaleUnit": "100%",
+ "Unit": "cpu_atom"
+ },
I didn't check the tma_info_inst_mix_iparith which Thomas mentioned
above yet. But I suspect it should be the same issue.
The perf test may have to error out when the "Cannot resolve IDs"
message is detected.
Thanks,
Kan
next prev parent reply other threads:[~2025-02-05 15:47 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-04 21:32 [PATCH v4 00/23] Intel vendor events and TMA 5.01 metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 01/23] perf vendor events: Update Alderlake events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 02/23] perf vendor events: Update AlderlakeN events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 03/23] perf vendor events: Add Arrowlake events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 04/23] perf vendor events: Update Broadwell events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 05/23] perf vendor events: Update BroadwellDE events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 06/23] perf vendor events: Update BroadwellX events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 07/23] perf vendor events: Update CascadelakeX events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 08/23] perf vendor events: Add Clearwaterforest events Ian Rogers
2025-02-04 21:32 ` [PATCH v4 09/23] perf vendor events: Update EmeraldRapids events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 10/23] perf vendor events: Update GrandRidge events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 11/23] perf vendor events: Update/add Graniterapids events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 12/23] perf vendor events: Update Haswell events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 13/23] perf vendor events: Update HaswellX events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 14/23] perf vendor events: Update Icelake events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 15/23] perf vendor events: Update IcelakeX events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 16/23] perf vendor events: Update/add Lunarlake events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 17/23] perf vendor events: Update Meteorlake events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 18/23] perf vendor events: Update Rocketlake events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 19/23] perf vendor events: Update Sapphirerapids events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 20/23] perf vendor events: Update Sierraforest events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 21/23] perf vendor events: Update Skylake metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 22/23] perf vendor events: Update SkylakeX events/metrics Ian Rogers
2025-02-04 21:32 ` [PATCH v4 23/23] perf vendor events: Update Tigerlake events/metrics Ian Rogers
2025-02-04 21:35 ` [PATCH v4 00/23] Intel vendor events and TMA 5.01 metrics Ian Rogers
2025-02-05 4:28 ` Falcon, Thomas
2025-02-05 4:58 ` Ian Rogers
2025-02-05 15:46 ` Liang, Kan [this message]
2025-02-05 16:35 ` Ian Rogers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ca45ff5e-3d1a-4149-8efe-7615dd3581ff@linux.intel.com \
--to=kan.liang@linux.intel.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=afaerber@suse.de \
--cc=alexander.shishkin@linux.intel.com \
--cc=caleb.biggers@intel.com \
--cc=edward.baker@intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=mpetlan@redhat.com \
--cc=namhyung@kernel.org \
--cc=perry.taylor@intel.com \
--cc=peterz@infradead.org \
--cc=samantha.alt@intel.com \
--cc=thomas.falcon@intel.com \
--cc=weilin.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox