Re: perf test hybrid failing on 14700K

From: Liang, Kan
Date: Tue Jan 30 2024 - 09:02:30 EST




On 2024-01-30 8:56 a.m., Arnaldo Carvalho de Melo wrote:
> Em Fri, Jan 19, 2024 at 10:09:10PM -0800, Ian Rogers escreveu:
>> On Sat, Dec 23, 2023 at 5:55 AM Arnaldo Carvalho de Melo
>> <acme@xxxxxxxxxx> wrote:
>>>
>>> Hi Kan,
>>>
>>> I noticed the following problem, are you able to reproduce it?
>>>
>>> Happy solstice!
>>>
>>> - Arnaldo
>>
>> Hi Arnaldo,
>>
>> I'm seeing a test failure on Alderlake in perf-tools-next and wondered
>> if it was on your radar:
>> ```
>> 32: Session topology :
>> --- start ---
>> test child forked, pid 539222
>> templ file: /tmp/perf-test-HMet21
>> Using CPUID GenuineIntel-6-97-2
>> ------------------------------------------------------------
>> perf_event_attr:
>> type 0 (PERF_TYPE_HARDWARE)
>> config 0x800000000
>> disabled 1
>> ------------------------------------------------------------
>> sys_perf_event_open: pid 0 cpu -1 group_fd -1 flags 0x8 = 4
>> ------------------------------------------------------------
>> perf_event_attr:
>> type 0 (PERF_TYPE_HARDWARE)
>> config 0x400000000
>> disabled 1
>> ------------------------------------------------------------
>> sys_perf_event_open: pid 0 cpu -1 group_fd -1 flags 0x8 = 5
>> non matching sample_type
>> FAILED tests/topology.c:73 can't get session
>> test child finished with -1
>> ---- end ----
>> Session topology: FAILED!
>> ```
>>
>> The code is hitting this line in evlist__valid_sample_type as
>> core.nr_entries is 2 on hybrid not 1:
>> https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/util/evlist.c?h=perf-tools-next#n1215
>> this causes perf_session__open to fail:
>> https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/util/session.c?h=perf-tools-next#n129
>
> Yes, I see this as well, haven't yet analysed it

This should has been fixed by James.
https://lore.kernel.org/lkml/20240124094358.489372-1-james.clark@xxxxxxx/

Thanks,
Kan
>
> root@number:~# perf test -v topology
> 38: Session topology :
> --- start ---
> test child forked, pid 260120
> templ file: /tmp/perf-test-WMa4M5
> Using CPUID GenuineIntel-6-B7-1
> non matching sample_type
> FAILED tests/topology.c:73 can't get session
> test child finished with -1
> ---- end ----
> Session topology: FAILED!
> root@number:~#
>