All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Michael Petlan <mpetlan@redhat.com>,
	Ian Rogers <irogers@google.com>,
	linux-perf-users@vger.kernel.org,
	"Frank Ch. Eigler" <fche@redhat.com>
Subject: Re: [RFC] perf record: Disable debuginfod by default
Date: Fri, 10 Dec 2021 10:33:48 -0300	[thread overview]
Message-ID: <YbNXPDVhplHIgayp@kernel.org> (raw)
In-Reply-To: <YbNHCLi/OdMUfgI0@krava>

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@kernel.org>
AuthorDate: Thu Jan 14 14:40:44 2021 +0100
Commit:     Alexei Starovoitov <ast@kernel.org>
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@kernel.org>
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lore.kernel.org/bpf/20210114134044.1418404-4-jolsa@kernel.org
$

- Arnaldo

  reply	other threads:[~2021-12-10 13:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09 20:04 [RFC] perf record: Disable debuginfod by default Jiri Olsa
2021-12-09 23:39 ` Namhyung Kim
2021-12-10 12:23   ` Jiri Olsa
2021-12-10 16:50     ` Frank Ch. Eigler
2021-12-19 13:04       ` Jiri Olsa
2021-12-10 18:41     ` Namhyung Kim
2021-12-11 19:57       ` Jiri Olsa
2021-12-10  8:04 ` Peter Zijlstra
2021-12-10 12:24   ` Jiri Olsa
2021-12-10 13:33     ` Arnaldo Carvalho de Melo [this message]
2021-12-19 13:06 ` Jiri Olsa
2022-01-15 20:22   ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YbNXPDVhplHIgayp@kernel.org \
    --to=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=fche@redhat.com \
    --cc=irogers@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@kernel.org \
    --cc=mpetlan@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.