diff options
| author | Ian Rogers <irogers@google.com> | 2025-07-24 09:32:59 -0700 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2025-07-25 10:37:58 -0700 |
| commit | 525a599badeeafba88a4fa0f913e5cf87e2d51ec (patch) | |
| tree | ae3c1ff9886f29550397dc89703361284732ea06 /tools/perf/util/bpf-event.c | |
| parent | 003a86bce0728ad160bcb7c7566a4d40aee3c235 (diff) | |
perf env: Remove global perf_env
The global perf_env was used for the host, but if a perf_env wasn't
easy to come by it was used in a lot of places where potentially
recorded and host data could be confused. Remove the global variable
as now the majority of accesses retrieve the perf_env for the host
from the session.
Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250724163302.596743-20-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/util/bpf-event.c')
| -rw-r--r-- | tools/perf/util/bpf-event.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/bpf-event.c b/tools/perf/util/bpf-event.c index 664f361ef8c1..5b6d3e899e11 100644 --- a/tools/perf/util/bpf-event.c +++ b/tools/perf/util/bpf-event.c @@ -549,7 +549,7 @@ static int perf_event__synthesize_one_bpf_prog(struct perf_session *session, * for perf-record and perf-report use header.env; * otherwise, use global perf_env. */ - env = session->data ? perf_session__env(session) : &perf_env; + env = perf_session__env(session); arrays = 1UL << PERF_BPIL_JITED_KSYMS; arrays |= 1UL << PERF_BPIL_JITED_FUNC_LENS; |
