Skip to contentSkip to conversation

perf annotate: Skip DSOs not found

PATCH In review Namhyung Kim 3 participants 3 messages Apr 10, 2024 – Apr 11, 2024 perf events

lore
Share & tools
lore

Namhyung Kim

author maintainer
#0 lore raw

PATCH 1/1 perf annotate: Skip DSOs not found

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"
  ...
---
 tools/perf/util/disasm.c | 2 ++
 1 file changed, 2 insertions(+)
tools/perf/util/disasm.c +2 -0
index a1219eb930aa..92937809be85 100644
@@ -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);
Signature · 1 line
2.44.0.478.gd926399ef9-goog
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Namhyung Kim

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

Perhaps: Closes:
https://lore.kernel.org/linux-perf-users/[email protected]/

Thanks,
Ian

Quoted 20 lines
---
 tools/perf/util/disasm.c | 2 ++
 1 file changed, 2 insertions(+)
tools/perf/util/disasm.c +2 -1
index a1219eb930aa..92937809be85 100644
@@ -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

maintainer Reviewed-by Ian Rogers Tested-by Konstantin Kharlamov
#2 lore raw
Quoted 6 lines · Ian Rogers
Quoted 5 lines · Namhyung Kim

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.

Quoted 8 lines
Quoted 5 lines
  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"
  ...

Perhaps: Closes:
https://lore.kernel.org/linux-perf-users/[email protected]/

I added:

Quoted 1 line

Thanks,

- Arnaldo