diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index 49a41b4b59cfd924c62ffbe4cabefb660eac6928..e65903a695a63af21e713f0460fb933f683a5939 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c @@ -282,7 +282,7 @@ static int _hist_entry__sym_snprintf(struct map *map, struct symbol *sym, ret += repsep_snprintf(bf + ret, size - ret, "[%c] ", level); if (sym && map) { - if (map->type == MAP__VARIABLE) { + if (sym->type == STT_OBJECT) { ret += repsep_snprintf(bf + ret, size - ret, "%s", sym->name); ret += repsep_snprintf(bf + ret, size - ret, "+0x%llx", ip - map->unmap_ip(map, sym->start)); diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index 88f6f3050665085873e8f577a36e8f7e8ceffc99..cf2e6f428bb4d9f38917d3176de05bf5a64eafe8 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -921,10 +921,10 @@ int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss, dso->adjust_symbols = runtime_ss->adjust_symbols || ref_reloc(kmap); /* - * Initial kernel and module mappings do not map to the dso. For - * function mappings, flag the fixups. + * Initial kernel and module mappings do not map to the dso. + * Flag the fixups. */ - if (map->type == MAP__FUNCTION && (dso->kernel || kmodule)) { + if (dso->kernel || kmodule) { remap_kernel = true; adjust_kernel_syms = dso->adjust_symbols; }