]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf tool_pmu: Factor tool events into their own PMU
authorIan Rogers <irogers@google.com>
Wed, 2 Oct 2024 03:20:07 +0000 (20:20 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 11 Oct 2024 06:40:32 +0000 (23:40 -0700)
commit240505b2d0adcdc8fd018117e88dc27b09734735
treee0406e4799a31f8bafb6a8ca4bf9880f5c02c374
parentd2f3ecb0ca2099d13bf8bf69219214c1425dc453
perf tool_pmu: Factor tool events into their own PMU

Rather than treat tool events as a special kind of event, create a
tool only PMU where the events/aliases match the existing
duration_time, user_time and system_time events. Remove special
parsing and printing support for the tool events, but add function
calls for when PMU functions are called on a tool_pmu.

Move the tool PMU code in evsel into tool_pmu.c to better encapsulate
the tool event behavior in that file.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20241002032016.333748-5-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
19 files changed:
tools/perf/builtin-list.c
tools/perf/builtin-stat.c
tools/perf/util/Build
tools/perf/util/evsel.c
tools/perf/util/evsel.h
tools/perf/util/metricgroup.c
tools/perf/util/parse-events.c
tools/perf/util/parse-events.h
tools/perf/util/parse-events.l
tools/perf/util/parse-events.y
tools/perf/util/pmu.c
tools/perf/util/pmu.h
tools/perf/util/pmus.c
tools/perf/util/print-events.c
tools/perf/util/print-events.h
tools/perf/util/stat-display.c
tools/perf/util/stat-shadow.c
tools/perf/util/tool_pmu.c [new file with mode: 0644]
tools/perf/util/tool_pmu.h [new file with mode: 0644]