[PATCH] perf: Print debuginfod queries if -v option is used

Martin Liška posted 1 patch 3 years, 8 months ago
tools/perf/util/build-id.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
[PATCH] perf: Print debuginfod queries if -v option is used
Posted by Martin Liška 3 years, 8 months ago
When ending a perf record session, the querying of a debuginfod
server can take quite some time. Inform a user about it when
-v options is used.

Signed-off-by: Martin Liska <mliska@suse.cz>
---
 tools/perf/util/build-id.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
index 0cc68cdd84c8..d1cfce0613ee 100644
--- a/tools/perf/util/build-id.c
+++ b/tools/perf/util/build-id.c
@@ -653,7 +653,9 @@ static char *build_id_cache__find_debug(const char *sbuild_id,
 
 #ifdef HAVE_DEBUGINFOD_SUPPORT
 	if (realname == NULL) {
-		debuginfod_client* c = debuginfod_begin();
+		debuginfod_client* c;
+		pr_debug("Downloading debug info with build id %s\n", sbuild_id);
+		c = debuginfod_begin();
 		if (c != NULL) {
 			int fd = debuginfod_find_debuginfo(c,
 					(const unsigned char*)sbuild_id, 0,
-- 
2.37.1
Re: [PATCH] perf: Print debuginfod queries if -v option is used
Posted by Arnaldo Carvalho de Melo 3 years, 8 months ago
Em Fri, Aug 12, 2022 at 01:43:53PM +0200, Martin Liška escreveu:
> When ending a perf record session, the querying of a debuginfod
> server can take quite some time. Inform a user about it when
> -v options is used.

Thanks, applied.

- Arnaldo

 
> Signed-off-by: Martin Liska <mliska@suse.cz>
> ---
>  tools/perf/util/build-id.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
> index 0cc68cdd84c8..d1cfce0613ee 100644
> --- a/tools/perf/util/build-id.c
> +++ b/tools/perf/util/build-id.c
> @@ -653,7 +653,9 @@ static char *build_id_cache__find_debug(const char *sbuild_id,
>  
>  #ifdef HAVE_DEBUGINFOD_SUPPORT
>  	if (realname == NULL) {
> -		debuginfod_client* c = debuginfod_begin();
> +		debuginfod_client* c;
> +		pr_debug("Downloading debug info with build id %s\n", sbuild_id);
> +		c = debuginfod_begin();
>  		if (c != NULL) {
>  			int fd = debuginfod_find_debuginfo(c,
>  					(const unsigned char*)sbuild_id, 0,
> -- 
> 2.37.1

-- 

- Arnaldo