summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2024-02-08 19:10:25 +0100
committerNamhyung Kim <namhyung@kernel.org>2024-02-09 23:08:41 +0100
commit9a440bb2e2e9a4af3a7857af42a825f61b27a18c (patch)
tree441941c3f55d710b2637168df6563277ca4bdac3
parentperf thread_map: Free strlist on normal path in thread_map__new_by_tid_str() (diff)
downloadlinux-9a440bb2e2e9a4af3a7857af42a825f61b27a18c.tar.xz
linux-9a440bb2e2e9a4af3a7857af42a825f61b27a18c.zip
perf tools: Remove misleading comments on map functions
When it converts sample IP to or from objdump-capable one, there's a comment saying that kernel modules have DSO_SPACE__USER. But commit 02213cec64bb ("perf maps: Mark module DSOs with kernel type") changed it and makes the comment confusing. Let's get rid of it. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Reviewed-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20240208181025.1329645-1-namhyung@kernel.org
-rw-r--r--tools/perf/util/map.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index 54c67cb7ecef..7a785a47467e 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -552,10 +552,6 @@ u64 map__rip_2objdump(struct map *map, u64 rip)
if (dso->rel)
return rip - map__pgoff(map);
- /*
- * kernel modules also have DSO_TYPE_USER in dso->kernel,
- * but all kernel modules are ET_REL, so won't get here.
- */
if (dso->kernel == DSO_SPACE__USER)
return rip + dso->text_offset;
@@ -584,10 +580,6 @@ u64 map__objdump_2mem(struct map *map, u64 ip)
if (dso->rel)
return map__unmap_ip(map, ip + map__pgoff(map));
- /*
- * kernel modules also have DSO_TYPE_USER in dso->kernel,
- * but all kernel modules are ET_REL, so won't get here.
- */
if (dso->kernel == DSO_SPACE__USER)
return map__unmap_ip(map, ip - dso->text_offset);