perf top: Make perf_env locally scoped
authorIan Rogers <irogers@google.com>
Thu, 24 Jul 2025 16:32:54 +0000 (09:32 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 25 Jul 2025 17:37:57 +0000 (10:37 -0700)
commitaaa23571fe4bb7fb7549ad09dd56de5ca1bd289d
tree0dae152794caa13562d4b5b8edc7995fd6ca8ad6
parent740f7ba1e3be5d6f192dafc5efd0bd0a8e8567e2
perf top: Make perf_env locally scoped

The use of the global host perf_env variable is potentially
inconsistent within the code. Switch perf top to using a locally
scoped variable that is generally accessed through the session.

Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250724163302.596743-15-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/builtin-top.c