linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: "Martin Liška" <mliska@suse.cz>
Cc: lkml <linux-kernel@vger.kernel.org>,
	linux-perf-users@vger.kernel.org, Jiri Olsa <jolsa@kernel.org>
Subject: Re: [PATCH] perf: print warning when HAVE_DEBUGINFOD_SUPPORT is not set
Date: Wed, 20 Apr 2022 13:34:23 -0300	[thread overview]
Message-ID: <YmA2D04uy5ijwe1c@kernel.org> (raw)
In-Reply-To: <35bae747-3951-dc3d-a66b-abf4cebcd9cb@suse.cz>

Em Wed, Apr 20, 2022 at 03:32:55PM +0200, Martin Liška escreveu:
> When one requests debuginfod, either via --debuginfod option, or
> with a perf-config value, complain when perf is not built with it.
> 
> Signed-off-by: Martin Liska <mliska@suse.cz>

I'll go and apply this manually:

⬢[acme@toolbox perf]$ am
warning: Patch sent with format=flowed; space at the end of lines might be lost.
Applying: perf: print warning when HAVE_DEBUGINFOD_SUPPORT is not set
error: corrupt patch at line 19
Patch failed at 0001 perf: print warning when HAVE_DEBUGINFOD_SUPPORT is not set
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
⬢[acme@toolbox perf]$ git am --abort
⬢[acme@toolbox perf]$ vim ~/wb/1.patch
⬢[acme@toolbox perf]$ patch -p1 < ~/wb/1.patch
patching file tools/perf/util/util.c
Hunk #1 FAILED at 430.
1 out of 1 hunk FAILED -- saving rejects to file tools/perf/util/util.c.rej
⬢[acme@toolbox perf]$ git diff
⬢[acme@toolbox perf]$
⬢[acme@toolbox perf]$ cat tools/perf/util/util.c.rej
--- tools/perf/util/util.c
+++ tools/perf/util/util.c
@@ -430,4 +430,9 @@ void perf_debuginfod_setup(struct perf_debuginfod *di)
  		setenv("DEBUGINFOD_URLS", di->urls, 1);

  	pr_debug("DEBUGINFOD_URLS=%s\n", getenv("DEBUGINFOD_URLS"));
+
+#ifndef HAVE_DEBUGINFOD_SUPPORT
+	if (di->set)
+		pr_warning("WARNING: debuginfod support requested, but perf is not built with it\n");
+#endif
  }
⬢[acme@toolbox perf]$

> ---
>  tools/perf/util/util.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
> index fb4f6616b5fa..289d83baaa2f 100644
> --- a/tools/perf/util/util.c
> +++ b/tools/perf/util/util.c
> @@ -430,4 +430,9 @@ void perf_debuginfod_setup(struct perf_debuginfod *di)
>  		setenv("DEBUGINFOD_URLS", di->urls, 1);
>  	pr_debug("DEBUGINFOD_URLS=%s\n", getenv("DEBUGINFOD_URLS"));
> +
> +#ifndef HAVE_DEBUGINFOD_SUPPORT
> +	if (di->set)
> +		pr_warning("WARNING: debuginfod support requested, but perf is not built with it\n");
> +#endif
>  }
> -- 
> 2.35.3

-- 

- Arnaldo

      reply	other threads:[~2022-04-20 16:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20 13:32 [PATCH] perf: print warning when HAVE_DEBUGINFOD_SUPPORT is not set Martin Liška
2022-04-20 16:34 ` Arnaldo Carvalho de Melo [this message]

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=YmA2D04uy5ijwe1c@kernel.org \
    --to=acme@kernel.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mliska@suse.cz \
    /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;
as well as URLs for NNTP newsgroup(s).