aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-inject.c
diff options
context:
space:
mode:
authorIan Rogers <[email protected]>2025-07-24 16:32:49 +0000
committerNamhyung Kim <[email protected]>2025-07-25 17:37:56 +0000
commitc3e5b9ec96dee864c2d6b00fbfe52e784f0d7bee (patch)
tree97bfe05652e699c9e314aeea01b661fb49750ab5 /tools/perf/builtin-inject.c
parentperf record: Make --buildid-mmap the default (diff)
downloadkernel-c3e5b9ec96dee864c2d6b00fbfe52e784f0d7bee.tar.gz
kernel-c3e5b9ec96dee864c2d6b00fbfe52e784f0d7bee.zip
perf session: Add accessor for session->header.env
The perf_env from the header in the session is frequently accessed, add an accessor function rather than access directly. Cache the value to avoid repeated calls. No behavioral change. Signed-off-by: Ian Rogers <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
Diffstat (limited to 'tools/perf/builtin-inject.c')
-rw-r--r--tools/perf/builtin-inject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index 13bbb493141f..f73350a3417a 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -2608,7 +2608,7 @@ int cmd_inject(int argc, const char **argv)
inject.tool.finished_round = perf_event__drop_oe;
}
#endif
- ret = symbol__init(&inject.session->header.env);
+ ret = symbol__init(perf_session__env(inject.session));
if (ret < 0)
goto out_delete;