aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-script.c
diff options
context:
space:
mode:
authorIan Rogers <[email protected]>2025-07-24 16:32:50 +0000
committerNamhyung Kim <[email protected]>2025-07-25 17:37:56 +0000
commit57ddb9cbb54fbf3772063795051b88a1f7258c6c (patch)
tree36f6a2e9b598aa305b9bb862fc623eeee16218fe /tools/perf/builtin-script.c
parentperf session: Add accessor for session->header.env (diff)
downloadkernel-57ddb9cbb54fbf3772063795051b88a1f7258c6c.tar.gz
kernel-57ddb9cbb54fbf3772063795051b88a1f7258c6c.zip
perf evlist: Change env variable to session
The session holds a perf_env pointer env. In UI code container_of is used to turn the env to a session, but this assumes the session header's env is in use. Rather than a dubious container_of, hold the session in the evlist and derive the env from the session with evsel__env, perf_session__env, etc. 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-script.c')
-rw-r--r--tools/perf/builtin-script.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 31cce67217b0..f2b5620165b4 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -2534,7 +2534,7 @@ static int process_attr(const struct perf_tool *tool, union perf_event *event,
* on events sample_type.
*/
sample_type = evlist__combined_sample_type(evlist);
- callchain_param_setup(sample_type, perf_env__arch((*pevlist)->env));
+ callchain_param_setup(sample_type, perf_env__arch(perf_session__env(scr->session)));
/* Enable fields for callchain entries */
if (symbol_conf.use_callchain &&