aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-script.c
diff options
context:
space:
mode:
authorNamhyung Kim <[email protected]>2025-06-06 22:54:31 +0000
committerNamhyung Kim <[email protected]>2025-06-20 20:33:30 +0000
commitdcbe6e51a0bb80a40f9a8c87750c291c2364573d (patch)
tree1f61f617b8ef2fb71828bfce35d4626d49c3af2e /tools/perf/builtin-script.c
parentperf test: Expand user space event reading (rdpmc) tests (diff)
downloadkernel-dcbe6e51a0bb80a40f9a8c87750c291c2364573d.tar.gz
kernel-dcbe6e51a0bb80a40f9a8c87750c291c2364573d.zip
perf parse-events: Set default GH modifier properly
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. Before: $ ./perf kvm record -vv true |& grep exclude (nothing) But specifying an event (without a modifier) works: $ ./perf kvm record -vv -e cycles true |& grep exclude exclude_host 1 After: It now works for the both cases: $ ./perf kvm record -vv true |& grep exclude exclude_host 1 $ ./perf kvm record -vv -e cycles true |& grep exclude exclude_host 1 Reviewed-by: Ian Rogers <[email protected]> Link: https://lore.kernel.org/r/[email protected] Fixes: 35c8d21371e9b342 ("perf tools: Don't set attr.exclude_guest by default") Signed-off-by: Namhyung Kim <[email protected]>
Diffstat (limited to 'tools/perf/builtin-script.c')
0 files changed, 0 insertions, 0 deletions