mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	James Clark <james.clark@linaro.org>,
	Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Clark Williams <williams@redhat.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH 2/8] perf debuginfo: Fetch debuginfo keyed by build ID using debuginfod
Date: Mon, 14 Sep 2026 13:25:53 -0700	[thread overview]
Message-ID: <aqhYUQgaf-UHDnLK@google.com> (raw)
In-Reply-To: <aqdTC_3In8ymE-RS@x2>

On Sun, Sep 13, 2026 at 10:51:07PM -0300, Arnaldo Carvalho de Melo wrote:
> On Sun, Sep 13, 2026 at 06:34:44PM -0700, Namhyung Kim wrote:
> > On Sun, Sep 13, 2026 at 07:28:14PM -0300, Arnaldo Carvalho de Melo wrote:
> > > From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> <SNIP>
> 
> > > Querying servers, possibly third party ones, sends off-box the build
> > > IDs of the binaries being analysed and a fetch can take a while, so
> > > this is opt-out: on by default, off with --no-debuginfod, with
> > > core.debuginfod=false, per tool with report.debuginfod and
> > > top.debuginfod, and, since users that set buildid.dir to /dev/null
> > > (e.g. Linus) or otherwise turn the local build-id cache off clearly
> > > don't want fetched files stored on the box, off too in that case.
> > > 
> > > When a fetch is in progress in a terminal, stdio, the way it prints
> > > progress is how one gets out of it: 's' aborts the current fetch via
> > > the debuginfod client's progress callback protocol and remembers the
> > > build ID, so that the rest of the session doesn't ask for it again,
> > > the user may have skipped it for being too big; 'd' additionally
> > > disables debuginfod for the rest of the session and points at 'perf
> > > config core.debuginfod=false' to make that permanent -- rewriting the
> > > user's ~/.perfconfig from a keypress would silently drop its comments
> > > -- and SIGINT/SIGTERM are intercepted while the terminal is in raw
> > > mode, so that it is restored and the signal is re-raised when the user
> > > interrupts a fetch.
> 
> <SNIP>
> 
> > > +++ b/tools/perf/builtin-annotate.c
> > > @@ -733,6 +733,8 @@ int cmd_annotate(int argc, const char **argv)
> > >  	OPT_BOOLEAN(0, "stdio2", &annotate.use_stdio2, "Use the stdio interface"),
> > >  	OPT_BOOLEAN(0, "ignore-vmlinux", &symbol_conf.ignore_vmlinux,
> > >                      "don't load vmlinux even if found"),
> > > +	OPT_BOOLEAN(0, "debuginfod", &symbol_conf.debuginfod,
> > > +                    "fetch debuginfo keyed by build ID from the debuginfod servers, on by default, use --no-debuginfod to turn off"),
> > 
> > I'm not sure what would be the good default.  But with this, it can slow
> > down the process especially when the binary is not in the debuginfod.
> 
> That is why it allows the user to press 's' to skip it or 'd' to do a
> one-time only disablement of this feature.
> 
> This is similar to gdb, that at session start asks if the debuginfo
> files for the binary and its libraries should be downloaded, well, a bit
> better because it allows the user to completely disable this at first
> sight by pressing 'd'.
> 
> It also already honours configs that disable the ~/.debug cache.

Oh.. I overlooked the details.  But then it'd be nice to separate the
logic for the user interaction from the debuginfo fetching.

Thanks,
Namhyung


  reply	other threads:[~2026-09-14 20:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-13 22:28 [PATCH v3 0/8] perf tools: Annotate fixes, stdio progress indication, debuginfo-client in more places Arnaldo Carvalho de Melo
2026-09-13 22:28 ` [PATCH 1/8] perf test: Skip data_type_profiling when the PMU cannot record memory events Arnaldo Carvalho de Melo
2026-09-14  1:31   ` Namhyung Kim
2026-09-14 22:17     ` Arnaldo Carvalho de Melo
2026-09-13 22:28 ` [PATCH 2/8] perf debuginfo: Fetch debuginfo keyed by build ID using debuginfod Arnaldo Carvalho de Melo
2026-09-14  1:34   ` Namhyung Kim
2026-09-14  1:51     ` Arnaldo Carvalho de Melo
2026-09-14 20:25       ` Namhyung Kim [this message]
2026-09-15  0:19         ` Arnaldo Carvalho de Melo
2026-09-13 22:28 ` [PATCH 3/8] perf symbol: Fall back to fetching the vmlinux by build ID Arnaldo Carvalho de Melo
2026-09-13 22:28 ` [PATCH 4/8] perf annotate-data: Show the sample count in the data-type browser Arnaldo Carvalho de Melo
2026-09-13 22:28 ` [PATCH 5/8] perf report: Add --progress option Arnaldo Carvalho de Melo
2026-09-13 22:28 ` [PATCH 6/8] perf scripts: Add perf-stuck, to tell where a running perf is stuck Arnaldo Carvalho de Melo
2026-09-13 22:28 ` [PATCH 7/8] perf annotate-data: Resolve type DIEs in the debug file they came from Arnaldo Carvalho de Melo
2026-09-13 22:28 ` [PATCH 8/8] perf mem record: Request PERF_SAMPLE_CPU by default Arnaldo Carvalho de Melo
2026-09-14  1:35 [PATCH v4 0/8] perf tools: Annotate fixes, stdio progress indication, debuginfo-client in more places Arnaldo Carvalho de Melo
2026-09-14  1:35 ` [PATCH 2/8] perf debuginfo: Fetch debuginfo keyed by build ID using debuginfod 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=aqhYUQgaf-UHDnLK@google.com \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=williams@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®