Re: [PATCH] perf parse-events: Set default GH modifier properly

From: Namhyung Kim
Date: Sat Jun 21 2025 - 14:01:44 EST


On Fri, 06 Jun 2025 15:54:31 -0700, Namhyung Kim wrote:
> Commit 7b100989b4f6bce7 ("perf evlist: Remove __evlist__add_default")
> changed to use "cycles:P" as a default event. But the problem is it
> cannot set other default modifiers correctly.
>
> perf kvm needs to set attr.exclude_host by default but it didn't work
> because of the logic in the parse_events__modifier_list(). Also the
> exclude_GH_default was applied only if ":u" modifier was specified -
> which is strange. Move it out after handling the ":GH" and check
> perf_host and perf_guest properly.
>
> [...]
Applied to perf-tools-next, thanks!

Best regards,
Namhyung