Re: [PATCH v2 1/5] perf tools: Improve handling of hybrid PMUs in perf_event_attr__fprintf
From: Namhyung Kim
Date: Wed Mar 12 2025 - 15:54:10 EST
On Thu, 06 Mar 2025 18:39:02 -0800, Ian Rogers wrote:
> Support the PMU name from the legacy hardware and hw_cache PMU
> extended types. Remove some macros and make variables more intention
> revealing, rather than just being called "value".
>
> Before:
> ```
> $ perf stat -vv -e instructions true
> ...
> ------------------------------------------------------------
> perf_event_attr:
> type 0 (PERF_TYPE_HARDWARE)
> size 136
> config 0xa00000001
> sample_type IDENTIFIER
> read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING
> disabled 1
> inherit 1
> enable_on_exec 1
> exclude_guest 1
> ------------------------------------------------------------
> sys_perf_event_open: pid 181636 cpu -1 group_fd -1 flags 0x8 = 5
> ------------------------------------------------------------
> perf_event_attr:
> type 0 (PERF_TYPE_HARDWARE)
> size 136
> config 0x400000001
> sample_type IDENTIFIER
> read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING
> disabled 1
> inherit 1
> enable_on_exec 1
> exclude_guest 1
> ------------------------------------------------------------
> sys_perf_event_open: pid 181636 cpu -1 group_fd -1 flags 0x8 = 6
> ...
> ```
>
> [...]
Applied to perf-tools-next, thanks!
Best regards,
Namhyung