diff options
| author | Ian Rogers <[email protected]> | 2025-07-24 16:32:49 +0000 |
|---|---|---|
| committer | Namhyung Kim <[email protected]> | 2025-07-25 17:37:56 +0000 |
| commit | c3e5b9ec96dee864c2d6b00fbfe52e784f0d7bee (patch) | |
| tree | 97bfe05652e699c9e314aeea01b661fb49750ab5 /tools/perf/builtin-kwork.c | |
| parent | perf record: Make --buildid-mmap the default (diff) | |
| download | kernel-c3e5b9ec96dee864c2d6b00fbfe52e784f0d7bee.tar.gz kernel-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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Namhyung Kim <[email protected]>
Diffstat (limited to 'tools/perf/builtin-kwork.c')
| -rw-r--r-- | tools/perf/builtin-kwork.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-kwork.c b/tools/perf/builtin-kwork.c index c41a68d073de..d2e08de5976d 100644 --- a/tools/perf/builtin-kwork.c +++ b/tools/perf/builtin-kwork.c @@ -1804,7 +1804,7 @@ static int perf_kwork__read_events(struct perf_kwork *kwork) return PTR_ERR(session); } - symbol__init(&session->header.env); + symbol__init(perf_session__env(session)); if (perf_kwork__check_config(kwork, session) != 0) goto out_delete; |
