]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf tool: Add the perf_tool argument to all callbacks
authorIan Rogers <irogers@google.com>
Fri, 7 Nov 2025 17:07:11 +0000 (09:07 -0800)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 7 Nov 2025 21:25:05 +0000 (13:25 -0800)
commit71062e282d6a662b75df9aff65702455563ff7c9
tree0846f2f94cf22afbb15bde7a822e560dd9fbe623
parentfa4a527af5cddad6f13abf80105f4da79876c31e
perf tool: Add the perf_tool argument to all callbacks

Getting context for what a tool is doing, such as the perf_inject
instance, using container_of the tool is a common pattern in the
code. This isn't possible event_op2, event_op3 and event_op4 callbacks
as the tool isn't passed. Add the argument and then fix function
signatures to match. As tools maybe reading a tool from somewhere
else, change that code to use the passed in tool.

Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
17 files changed:
tools/perf/builtin-annotate.c
tools/perf/builtin-evlist.c
tools/perf/builtin-inject.c
tools/perf/builtin-report.c
tools/perf/builtin-script.c
tools/perf/builtin-stat.c
tools/perf/util/auxtrace.c
tools/perf/util/auxtrace.h
tools/perf/util/header.c
tools/perf/util/header.h
tools/perf/util/intel-tpebs.c
tools/perf/util/session.c
tools/perf/util/session.h
tools/perf/util/stat.c
tools/perf/util/stat.h
tools/perf/util/tool.c
tools/perf/util/tool.h