Re: perf mem record not getting the mem_load_aux events by default

From: Liang, Kan
Date: Wed Sep 04 2024 - 11:21:13 EST




On 2024-09-04 10:30 a.m., Arnaldo Carvalho de Melo wrote:
> Hi Kan,
>
> Recently I presented about 'perf mem record' and found that I had use
> 'perf record' directly as 'perf mem record' on a Intel Hybrid system
> wasn't selecting the required aux event:
>
> http://vger.kernel.org/~acme/prez/lsfmm-bpf-2024/#/19
>
> The previous slides show the problem and the one above shows what worked
> for me.
>
> I saw this while trying to fix that:
>
> Author: Kan Liang <kan.liang@xxxxxxxxxxxxxxx>
> commit abbdd79b786e036e60f01b7907977943ebe7a74d
> Date: Tue Jan 23 10:50:32 2024 -0800
>
> perf mem: Clean up perf_mem_events__name()
>
> Introduce a generic perf_mem_events__name(). Remove the ARCH-specific
> one.
>
> The mem_load events may have a different format. Add ldlat and aux_event
> in the struct perf_mem_event to indicate the format and the extra aux
> event.
>
> Add perf_mem_events_intel_aux[] to support the extra mem_load_aux event.
>
> Rename perf_mem_events__name to perf_pmu__mem_events_name.
>
> --------------------------´
>
> So there are provisions for selecting the right events, but it doesn't
> seem to be working when I tried, can you take a look at what I describe
> on those slides and see what am I doing wrong?
>

If I understand the example in the slides correctly, the issue is that
no mem events from big core are selected when running perf mem record,
rather than wrong mem events are selected.

I don't see an obvious issue. That looks like a regression of the perf
mem record. I will find a Alder Lake or Raptor Lake to take a deep look.

Thanks,
Kan