Commit 9a440bb2 authored by Namhyung Kim's avatar Namhyung Kim

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
02213cec ("perf maps: Mark module DSOs with kernel type") changed
it and makes the comment confusing.  Let's get rid of it.
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Acked-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Reviewed-by: default avatarIan Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20240208181025.1329645-1-namhyung@kernel.org
parent 1eb3d924
...@@ -552,10 +552,6 @@ u64 map__rip_2objdump(struct map *map, u64 rip) ...@@ -552,10 +552,6 @@ u64 map__rip_2objdump(struct map *map, u64 rip)
if (dso->rel) if (dso->rel)
return rip - map__pgoff(map); 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) if (dso->kernel == DSO_SPACE__USER)
return rip + dso->text_offset; return rip + dso->text_offset;
...@@ -584,10 +580,6 @@ u64 map__objdump_2mem(struct map *map, u64 ip) ...@@ -584,10 +580,6 @@ u64 map__objdump_2mem(struct map *map, u64 ip)
if (dso->rel) if (dso->rel)
return map__unmap_ip(map, ip + map__pgoff(map)); 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) if (dso->kernel == DSO_SPACE__USER)
return map__unmap_ip(map, ip - dso->text_offset); return map__unmap_ip(map, ip - dso->text_offset);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment