perf evlist: Change env variable to session
authorIan Rogers <irogers@google.com>
Thu, 24 Jul 2025 16:32:50 +0000 (09:32 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 25 Jul 2025 17:37:56 +0000 (10:37 -0700)
commit57ddb9cbb54fbf3772063795051b88a1f7258c6c
tree36f6a2e9b598aa305b9bb862fc623eeee16218fe
parentc3e5b9ec96dee864c2d6b00fbfe52e784f0d7bee
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 <irogers@google.com>
Link: https://lore.kernel.org/r/20250724163302.596743-11-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
17 files changed:
tools/perf/builtin-report.c
tools/perf/builtin-script.c
tools/perf/builtin-top.c
tools/perf/tests/topology.c
tools/perf/ui/browser.h
tools/perf/ui/browsers/header.c
tools/perf/ui/browsers/hists.c
tools/perf/util/amd-sample-raw.c
tools/perf/util/arm-spe.c
tools/perf/util/evlist.h
tools/perf/util/evsel.c
tools/perf/util/evsel.h
tools/perf/util/header.c
tools/perf/util/s390-cpumsf.c
tools/perf/util/sample-raw.c
tools/perf/util/sample-raw.h
tools/perf/util/session.c