diff options
| author | Ian Rogers <irogers@google.com> | 2025-07-24 09:32:49 -0700 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2025-07-25 10:37:56 -0700 |
| commit | c3e5b9ec96dee864c2d6b00fbfe52e784f0d7bee (patch) | |
| tree | 97bfe05652e699c9e314aeea01b661fb49750ab5 /tools/perf/builtin-buildid-cache.c | |
| parent | perf record: Make --buildid-mmap the default (diff) | |
| download | linux-c3e5b9ec96dee864c2d6b00fbfe52e784f0d7bee.tar.gz linux-c3e5b9ec96dee864c2d6b00fbfe52e784f0d7bee.zip | |
perf session: Add accessor for session->header.env
The perf_env from the header in the session is frequently accessed,
add an accessor function rather than access directly. Cache the value
to avoid repeated calls. No behavioral change.
Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250724163302.596743-10-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/builtin-buildid-cache.c')
| -rw-r--r-- | tools/perf/builtin-buildid-cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c index e936a34b7d37..c98104481c8a 100644 --- a/tools/perf/builtin-buildid-cache.c +++ b/tools/perf/builtin-buildid-cache.c @@ -453,7 +453,7 @@ int cmd_buildid_cache(int argc, const char **argv) return PTR_ERR(session); } - if (symbol__init(session ? &session->header.env : NULL) < 0) + if (symbol__init(session ? perf_session__env(session) : NULL) < 0) goto out; setup_pager(); |
