All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf annotate: Skip DSOs not found
@ 2024-04-10 18:51 Namhyung Kim
  2024-04-10 19:14 ` Ian Rogers
  0 siblings, 1 reply; 3+ messages in thread
From: Namhyung Kim @ 2024-04-10 18:51 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Ian Rogers, Kan Liang
  Cc: Jiri Olsa, Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML,
	linux-perf-users

In some data file, I see the following messages repeated.  It seems it
doesn't have DSOs in the system and the dso->binary_type is set to
DSO_BINARY_TYPE__NOT_FOUND.  Let's skip them to avoid the followings.

  No output from objdump  --start-address=0x0000000000000000 --stop-address=0x00000000000000d4  -d --no-show-raw-insn       -C "$1"
  Error running objdump  --start-address=0x0000000000000000 --stop-address=0x0000000000000631  -d --no-show-raw-insn       -C "$1"
  ...

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/util/disasm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/util/disasm.c b/tools/perf/util/disasm.c
index a1219eb930aa..92937809be85 100644
--- a/tools/perf/util/disasm.c
+++ b/tools/perf/util/disasm.c
@@ -1669,6 +1669,8 @@ int symbol__disassemble(struct symbol *sym, struct annotate_args *args)
 		return symbol__disassemble_bpf(sym, args);
 	} else if (dso->binary_type == DSO_BINARY_TYPE__BPF_IMAGE) {
 		return symbol__disassemble_bpf_image(sym, args);
+	} else if (dso->binary_type == DSO_BINARY_TYPE__NOT_FOUND) {
+		return -1;
 	} else if (dso__is_kcore(dso)) {
 		kce.kcore_filename = symfs_filename;
 		kce.addr = map__rip_2objdump(map, sym->start);
-- 
2.44.0.478.gd926399ef9-goog


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

* Re: [PATCH] perf annotate: Skip DSOs not found
  2024-04-10 18:51 [PATCH] perf annotate: Skip DSOs not found Namhyung Kim
@ 2024-04-10 19:14 ` Ian Rogers
  2024-04-11 11:04   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Rogers @ 2024-04-10 19:14 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Arnaldo Carvalho de Melo, Kan Liang, Jiri Olsa, Adrian Hunter,
	Peter Zijlstra, Ingo Molnar, LKML, linux-perf-users

On Wed, Apr 10, 2024 at 11:51 AM Namhyung Kim <namhyung@kernel.org> wrote:
>
> In some data file, I see the following messages repeated.  It seems it
> doesn't have DSOs in the system and the dso->binary_type is set to
> DSO_BINARY_TYPE__NOT_FOUND.  Let's skip them to avoid the followings.
>
>   No output from objdump  --start-address=0x0000000000000000 --stop-address=0x00000000000000d4  -d --no-show-raw-insn       -C "$1"
>   Error running objdump  --start-address=0x0000000000000000 --stop-address=0x0000000000000631  -d --no-show-raw-insn       -C "$1"
>   ...
>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>

Perhaps: Closes:
https://lore.kernel.org/linux-perf-users/15e1a2847b8cebab4de57fc68e033086aa6980ce.camel@yandex.ru/

Reviewed-by: Ian Rogers <irogers@google.com>

Thanks,
Ian


> ---
>  tools/perf/util/disasm.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tools/perf/util/disasm.c b/tools/perf/util/disasm.c
> index a1219eb930aa..92937809be85 100644
> --- a/tools/perf/util/disasm.c
> +++ b/tools/perf/util/disasm.c
> @@ -1669,6 +1669,8 @@ int symbol__disassemble(struct symbol *sym, struct annotate_args *args)
>                 return symbol__disassemble_bpf(sym, args);
>         } else if (dso->binary_type == DSO_BINARY_TYPE__BPF_IMAGE) {
>                 return symbol__disassemble_bpf_image(sym, args);
> +       } else if (dso->binary_type == DSO_BINARY_TYPE__NOT_FOUND) {
> +               return -1;
>         } else if (dso__is_kcore(dso)) {
>                 kce.kcore_filename = symfs_filename;
>                 kce.addr = map__rip_2objdump(map, sym->start);
> --
> 2.44.0.478.gd926399ef9-goog
>

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

* Re: [PATCH] perf annotate: Skip DSOs not found
  2024-04-10 19:14 ` Ian Rogers
@ 2024-04-11 11:04   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-04-11 11:04 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Namhyung Kim, Konstantin Kharlamov, Kan Liang, Jiri Olsa,
	Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML,
	linux-perf-users

On Wed, Apr 10, 2024 at 12:14:37PM -0700, Ian Rogers wrote:
> On Wed, Apr 10, 2024 at 11:51 AM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> > In some data file, I see the following messages repeated.  It seems it
> > doesn't have DSOs in the system and the dso->binary_type is set to
> > DSO_BINARY_TYPE__NOT_FOUND.  Let's skip them to avoid the followings.
> >
> >   No output from objdump  --start-address=0x0000000000000000 --stop-address=0x00000000000000d4  -d --no-show-raw-insn       -C "$1"
> >   Error running objdump  --start-address=0x0000000000000000 --stop-address=0x0000000000000631  -d --no-show-raw-insn       -C "$1"
> >   ...
> >
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> 
> Perhaps: Closes:
> https://lore.kernel.org/linux-perf-users/15e1a2847b8cebab4de57fc68e033086aa6980ce.camel@yandex.ru/

I added:

Closes: https://lore.kernel.org/linux-perf-users/15e1a2847b8cebab4de57fc68e033086aa6980ce.camel@yandex.ru/
Reported-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>

> Reviewed-by: Ian Rogers <irogers@google.com>

Thanks,

- Arnaldo

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

end of thread, other threads:[~2024-04-11 11:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-10 18:51 [PATCH] perf annotate: Skip DSOs not found Namhyung Kim
2024-04-10 19:14 ` Ian Rogers
2024-04-11 11:04   ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.