[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250220185512.3357820-1-stephen.s.brennan@oracle.com>
Date: Thu, 20 Feb 2025 10:55:08 -0800
From: Stephen Brennan <stephen.s.brennan@...cle.com>
To: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>
Cc: Stephen Brennan <stephen.s.brennan@...cle.com>,
"Liang, Kan" <kan.liang@...ux.intel.com>,
Mark Rutland <mark.rutland@....com>,
Athira Rajeev <atrajeev@...ux.vnet.ibm.com>,
Jiri Olsa <jolsa@...nel.org>, linux-kernel@...r.kernel.org,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
James Clark <james.clark@...aro.org>,
Chaitanya S Prakash <chaitanyas.prakash@....com>,
Ian Rogers <irogers@...gle.com>, linux-perf-users@...r.kernel.org,
Adrian Hunter <adrian.hunter@...el.com>,
Andi Kleen <ak@...ux.intel.com>
Subject: [PATCH v2 0/3] Support .gnu_debugdata for symbols in perf
Hello all,
This series adds the ability to read symbols from the ".gnu_debugdata" section,
an LZMA-compressed embedded ELF file which is supposed to contain additional ELF
symbols. This is something that Fedora implemented (as "MiniDebuginfo" [1]).
There are more details in v1. I've tested it with binaries that have
.gnu_debugdata, and I've also ensured that the build & runtime work when LZMA is
disabled.
[1]: https://fedoraproject.org/wiki/Features/MiniDebugInfo
Changes since v1:
* Reuses the existing LZMA decompression helpers, rather than implementing a
new LZMA decompression loop. This does involve creating a temporary file, but
I think that actually makes things cleaner, since now the symsrc has a file
descriptor to close, rather than adding a new pointer that needs freeing.
* I did also remove the pr_debug() for the case where there is no
".gnu_debugdata" section. That's not really an error worth logging, that's
just normal operation.
* I added a pr_debug() for the case where we successfully load .gnu_debugdata
so that it's easier to determine whether it gets used in tests.
v1: https://lore.kernel.org/linux-perf-users/20250213190542.3249050-1-stephen.s.brennan@oracle.com/
Stephen Brennan (3):
tools: perf: add dummy functions for !HAVE_LZMA_SUPPORT
tools: perf: add LZMA decompression from FILE
tools: perf: support .gnu_debugdata for symbols
tools/perf/util/compress.h | 20 +++++++
tools/perf/util/dso.c | 2 +
tools/perf/util/dso.h | 1 +
tools/perf/util/lzma.c | 29 ++++++----
tools/perf/util/symbol-elf.c | 106 ++++++++++++++++++++++++++++++++++-
tools/perf/util/symbol.c | 2 +
6 files changed, 147 insertions(+), 13 deletions(-)
--
2.43.5
Powered by blists - more mailing lists