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/session.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/session.c')
| -rw-r--r-- | tools/perf/util/session.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 36532329a633..2a79e6844f36 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -192,7 +192,8 @@ struct perf_session *__perf_session__new(struct perf_data *data, symbol_conf.kallsyms_name = perf_data__kallsyms_name(data); } } else { - session->machines.host.env = host_env ?: &perf_env; + assert(host_env != NULL); + session->machines.host.env = host_env; } if (session->evlist) session->evlist->session = session; |
