Re: [PATCH v1 00/40] Fix perf on Intel hybrid CPUs

From: Liang, Kan
Date: Wed Apr 26 2023 - 18:07:46 EST




On 2023-04-26 5:33 p.m., Arnaldo Carvalho de Melo wrote:
> Em Wed, Apr 26, 2023 at 06:09:36PM -0300, Arnaldo Carvalho de Melo escreveu:
>> Em Wed, Apr 26, 2023 at 12:00:10AM -0700, Ian Rogers escreveu:
>>> TL;DR: hybrid doesn't crash, json metrics work on hybrid on both PMUs
>>> or individually, event parsing doesn't always scan all PMUs, more and
>>> new tests that also run without hybrid, less code.
>>>
>>> The first patches were previously posted to improve metrics here:
>>> "perf stat: Introduce skippable evsels"
>>> https://lore.kernel.org/all/20230414051922.3625666-1-irogers@xxxxxxxxxx/
>>> "perf vendor events intel: Add xxx metric constraints"
>>> https://lore.kernel.org/all/20230419005423.343862-1-irogers@xxxxxxxxxx/
>>>
>>> Next are some general test improvements.
>>
>> Kan,
>>
>> Have you looked at this? I'm doing a test build on it now.
>
> And just to make clear, this is for v6.5.
>

I'm looking at the patch series, but I cannot finish all the reviews
today. I will try to finish it tomorrow.

But there is one obvious bug with this series.
The topdown events of atom are duplicated. The below is just an example.
Almost all the atom Topdown events in the examples have such issue.

> $ perf stat --cputype=atom -M TopdownL1 -a sleep 1
>
> Performance counter stats for 'system wide':
>
> 645,836 cpu_atom/TOPDOWN_RETIRING.ALL/ # 26.4 % tma_bad_speculation
> 2,404,468 cpu_atom/TOPDOWN_FE_BOUND.ALL/ # 38.9 % tma_frontend_bound
> 1,455,604 cpu_atom/TOPDOWN_BE_BOUND.ALL/ # 23.6 % tma_backend_bound
> # 23.6 % tma_backend_bound_aux
> 1,235,109 cpu_atom/CPU_CLK_UNHALTED.CORE/ # 10.4 % tma_retiring
> 642,124 cpu_atom/TOPDOWN_RETIRING.ALL/
> 2,398,892 cpu_atom/TOPDOWN_FE_BOUND.ALL/
> 1,503,157 cpu_atom/TOPDOWN_BE_BOUND.ALL/



Thanks,
Kan