Re: [PATCH] perf test: Fix session topology test on heterogeneous systems

From: James Clark
Date: Mon Jan 22 2024 - 12:10:04 EST




On 22/01/2024 15:54, James Clark wrote:
> The test currently fails with this message when evlist__new_default()
> opens more than one event:
>
> 32: Session topology :
> --- start ---
> templ file: /tmp/perf-test-vv5YzZ
> Using CPUID 0x00000000410fd070
> Opening: unknown-hardware:HG
> ------------------------------------------------------------
> perf_event_attr:
> type 0 (PERF_TYPE_HARDWARE)
> config 0xb00000000
> disabled 1
> ------------------------------------------------------------
> sys_perf_event_open: pid 0 cpu -1 group_fd -1 flags 0x8 = 4
> Opening: unknown-hardware:HG
> ------------------------------------------------------------
> perf_event_attr:
> type 0 (PERF_TYPE_HARDWARE)
> config 0xa00000000
> 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
> ---- end ----
> Session topology: FAILED!
>
> This is because when re-opening the file and parsing the header, Perf
> expects that any file that has more than one event has the session ID

session ID -> sample ID