Skip to content

Commit

Permalink
perf tools: Remove misleading comments on map functions
Browse files Browse the repository at this point in the history
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
02213ce ("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 <[email protected]>
Acked-by: Arnaldo Carvalho de Melo <[email protected]>
Reviewed-by: Ian Rogers <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
namhyung committed Feb 9, 2024
1 parent 1eb3d92 commit 9a440bb
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions tools/perf/util/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 9a440bb

Please sign in to comment.