Re: [PATCH v14 1/7] perf/core: Add PMU_EVENT_ATTR_ID_STRING

Ingo Molnar
2025-02-22T12:42:27Z

* Lucas De Marchi <lucas.demarchi@intel.com> wrote:

> struct perf_pmu_events_attr has both id and event_str however zeroes
> the id and only set event_str. Add another macro that allows to set both
> so drivers can make use of them. The id is useful for determining the
> visibility of the attributes without resorting to creating separate
> groups passed via update_attr, while the event_str is still useful for
> attributes like *.unit or *.scale.
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
> include/linux/perf_event.h | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)

Acked-by: Ingo Molnar <mingo@kernel.org>

Thanks,

Ingo