* [PATCH] perf: fix coding style in build-id.c
@ 2022-08-12 11:42 Martin Liška
2022-08-12 11:43 ` [PATCH] perf: Print debuginfod queries if -v option is used Martin Liška
2022-08-12 13:23 ` [PATCH] perf: fix coding style in build-id.c Arnaldo Carvalho de Melo
0 siblings, 2 replies; 4+ messages in thread
From: Martin Liška @ 2022-08-12 11:42 UTC (permalink / raw)
To: linux-kernel, linux-perf-users; +Cc: Arnaldo Carvalho de Melo
Use tabs instead of 8 spaces for the indentation.
Signed-off-by: Martin Liska <mliska@suse.cz>
---
tools/perf/util/build-id.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
index 9e176146eb10..0cc68cdd84c8 100644
--- a/tools/perf/util/build-id.c
+++ b/tools/perf/util/build-id.c
@@ -652,17 +652,17 @@ static char *build_id_cache__find_debug(const char *sbuild_id,
nsinfo__mountns_exit(&nsc);
#ifdef HAVE_DEBUGINFOD_SUPPORT
- if (realname == NULL) {
- debuginfod_client* c = debuginfod_begin();
- if (c != NULL) {
- int fd = debuginfod_find_debuginfo(c,
- (const unsigned char*)sbuild_id, 0,
- &realname);
- if (fd >= 0)
- close(fd); /* retaining reference by realname */
- debuginfod_end(c);
- }
- }
+ if (realname == NULL) {
+ debuginfod_client* c = debuginfod_begin();
+ if (c != NULL) {
+ int fd = debuginfod_find_debuginfo(c,
+ (const unsigned char*)sbuild_id, 0,
+ &realname);
+ if (fd >= 0)
+ close(fd); /* retaining reference by realname */
+ debuginfod_end(c);
+ }
+ }
#endif
out:
--
2.37.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] perf: Print debuginfod queries if -v option is used
2022-08-12 11:42 [PATCH] perf: fix coding style in build-id.c Martin Liška
@ 2022-08-12 11:43 ` Martin Liška
2022-08-12 13:24 ` Arnaldo Carvalho de Melo
2022-08-12 13:23 ` [PATCH] perf: fix coding style in build-id.c Arnaldo Carvalho de Melo
1 sibling, 1 reply; 4+ messages in thread
From: Martin Liška @ 2022-08-12 11:43 UTC (permalink / raw)
To: linux-kernel, linux-perf-users; +Cc: Arnaldo Carvalho de Melo
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] perf: fix coding style in build-id.c
2022-08-12 11:42 [PATCH] perf: fix coding style in build-id.c Martin Liška
2022-08-12 11:43 ` [PATCH] perf: Print debuginfod queries if -v option is used Martin Liška
@ 2022-08-12 13:23 ` Arnaldo Carvalho de Melo
1 sibling, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-08-12 13:23 UTC (permalink / raw)
To: Martin Liška; +Cc: linux-kernel, linux-perf-users
Em Fri, Aug 12, 2022 at 01:42:56PM +0200, Martin Liška escreveu:
> Use tabs instead of 8 spaces for the indentation.
Thanks, applied.
- Arnaldo
> Signed-off-by: Martin Liska <mliska@suse.cz>
> ---
> tools/perf/util/build-id.c | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
> index 9e176146eb10..0cc68cdd84c8 100644
> --- a/tools/perf/util/build-id.c
> +++ b/tools/perf/util/build-id.c
> @@ -652,17 +652,17 @@ static char *build_id_cache__find_debug(const char *sbuild_id,
> nsinfo__mountns_exit(&nsc);
>
> #ifdef HAVE_DEBUGINFOD_SUPPORT
> - if (realname == NULL) {
> - debuginfod_client* c = debuginfod_begin();
> - if (c != NULL) {
> - int fd = debuginfod_find_debuginfo(c,
> - (const unsigned char*)sbuild_id, 0,
> - &realname);
> - if (fd >= 0)
> - close(fd); /* retaining reference by realname */
> - debuginfod_end(c);
> - }
> - }
> + if (realname == NULL) {
> + debuginfod_client* c = debuginfod_begin();
> + if (c != NULL) {
> + int fd = debuginfod_find_debuginfo(c,
> + (const unsigned char*)sbuild_id, 0,
> + &realname);
> + if (fd >= 0)
> + close(fd); /* retaining reference by realname */
> + debuginfod_end(c);
> + }
> + }
> #endif
>
> out:
> --
> 2.37.1
--
- Arnaldo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf: Print debuginfod queries if -v option is used
2022-08-12 11:43 ` [PATCH] perf: Print debuginfod queries if -v option is used Martin Liška
@ 2022-08-12 13:24 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-08-12 13:24 UTC (permalink / raw)
To: Martin Liška; +Cc: linux-kernel, linux-perf-users
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-08-12 13:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-12 11:42 [PATCH] perf: fix coding style in build-id.c Martin Liška
2022-08-12 11:43 ` [PATCH] perf: Print debuginfod queries if -v option is used Martin Liška
2022-08-12 13:24 ` Arnaldo Carvalho de Melo
2022-08-12 13:23 ` [PATCH] perf: fix coding style in build-id.c 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).