Re: [RFC] perf record: Disable debuginfod by default
From: Arnaldo Carvalho de Melo
Date: Fri Dec 10 2021 - 08:33:55 EST
Em Fri, Dec 10, 2021 at 01:24:40PM +0100, Jiri Olsa escreveu:
> On Fri, Dec 10, 2021 at 09:04:25AM +0100, Peter Zijlstra wrote:
> > On Thu, Dec 09, 2021 at 09:04:25PM +0100, Jiri Olsa wrote:
> > > Adding single perf_debuginfod_setup function and using
> > > it also in perf buildid-cache command.
> > I'm still running with --no-buildid --no-buildid-cache or something like
> > that by default. As long as that remains working I'm good.
> you're good ;-) that will bypass the problem completely
And these days buildids come in PERF_RECORD_MMAP records when possible
(kernel new enough), so no extra step at the end for traversing
PERF_RECORD_MMAP records, read the DSO, find the build id, etc:
$ git log --pretty=fuller -1 --author=jolsa kernel/events/
commit 88a16a1309333e43d328621ece3e9fa37027e8eb
Author: Jiri Olsa <jolsa@xxxxxxxxxx>
AuthorDate: Thu Jan 14 14:40:44 2021 +0100
Commit: Alexei Starovoitov <ast@xxxxxxxxxx>
CommitDate: Thu Jan 14 19:29:58 2021 -0800
perf: Add build id data in mmap2 event
Adding support to carry build id data in mmap2 event.
The build id data replaces maj/min/ino/ino_generation
fields, which are also used to identify map's binary,
so it's ok to replace them with build id data:
union {
struct {
u32 maj;
u32 min;
u64 ino;
u64 ino_generation;
};
struct {
u8 build_id_size;
u8 __reserved_1;
u16 __reserved_2;
u8 build_id[20];
};
};
Replaced maj/min/ino/ino_generation fields give us size
of 24 bytes. We use 20 bytes for build id data, 1 byte
for size and rest is unused.
There's new misc bit for mmap2 to signal there's build
id data in it:
#define PERF_RECORD_MISC_MMAP_BUILD_ID (1 << 14)
Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx>
Acked-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Link: https://lore.kernel.org/bpf/20210114134044.1418404-4-jolsa@xxxxxxxxxx
$
- Arnaldo