perf header: Clean up use of perf_env
authorIan Rogers <irogers@google.com>
Thu, 24 Jul 2025 16:32:51 +0000 (09:32 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 25 Jul 2025 17:37:57 +0000 (10:37 -0700)
commitb743a1368dea43b4ef6e51c2931eeada07556d87
tree90d58aa3d4c5b2ace59de133fc28c3913577fdd0
parent57ddb9cbb54fbf3772063795051b88a1f7258c6c
perf header: Clean up use of perf_env

Always use the perf_env from the feat_fd's perf_header. Cache the
value on entry to a function in `env` and use `env->` consistently in
the code. Ensure the header is initialized for use in
perf_session__do_write_header.

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