linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf: print warning when HAVE_DEBUGINFOD_SUPPORT is not set
@ 2022-04-20 13:32 Martin Liška
  2022-04-20 16:34 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Liška @ 2022-04-20 13:32 UTC (permalink / raw)
  To: lkml; +Cc: linux-perf-users, Jiri Olsa, Arnaldo Carvalho de Melo

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>
---
  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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-20 16:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).