aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Rogers <[email protected]>2023-12-06 17:16:35 -0800
committerArnaldo Carvalho de Melo <[email protected]>2023-12-18 21:34:51 -0300
commit5cc47ffba7b71e37d65c259f7f5778b3622f1e8f (patch)
tree5fdf2938e3f18808c27ff76b2c53cc1b812776f2
parent67bc993446d340d4f059014f6be6ead35ec5f88b (diff)
perf map: Improve map/unmap parameter names
The u64 values are either absolute or relative, try to hint better in the parameter names. Suggested-by: Namhyung Kim <[email protected]> Signed-off-by: Ian Rogers <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Athira Rajeev <[email protected]> Cc: Changbin Du <[email protected]> Cc: Colin Ian King <[email protected]> Cc: Dmitrii Dolgov <[email protected]> Cc: German Gomez <[email protected]> Cc: Guilherme Amadio <[email protected]> Cc: Huacai Chen <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: James Clark <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: K Prateek Nayak <[email protected]> Cc: Kajol Jain <[email protected]> Cc: Kan Liang <[email protected]> Cc: Leo Yan <[email protected]> Cc: Li Dong <[email protected]> Cc: Liam Howlett <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Miguel Ojeda <[email protected]> Cc: Ming Wang <[email protected]> Cc: Nick Terrell <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Ravi Bangoria <[email protected]> Cc: Sandipan Das <[email protected]> Cc: Sean Christopherson <[email protected]> Cc: Steinar H. Gunderson <[email protected]> Cc: Vincent Whitchurch <[email protected]> Cc: Wenyu Liu <[email protected]> Cc: Yang Jihong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/util/map.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h
index 3a3b7757da5f..49756716cb13 100644
--- a/tools/perf/util/map.h
+++ b/tools/perf/util/map.h
@@ -105,25 +105,25 @@ static inline u64 map__dso_map_ip(const struct map *map, u64 ip)
}
/* dso rip -> ip */
-static inline u64 map__dso_unmap_ip(const struct map *map, u64 ip)
+static inline u64 map__dso_unmap_ip(const struct map *map, u64 rip)
{
- return ip + map__start(map) - map__pgoff(map);
+ return rip + map__start(map) - map__pgoff(map);
}
-static inline u64 map__map_ip(const struct map *map, u64 ip)
+static inline u64 map__map_ip(const struct map *map, u64 ip_or_rip)
{
if ((RC_CHK_ACCESS(map)->mapping_type) == MAPPING_TYPE__DSO)
- return map__dso_map_ip(map, ip);
+ return map__dso_map_ip(map, ip_or_rip);
else
- return ip;
+ return ip_or_rip;
}
-static inline u64 map__unmap_ip(const struct map *map, u64 ip)
+static inline u64 map__unmap_ip(const struct map *map, u64 ip_or_rip)
{
if ((RC_CHK_ACCESS(map)->mapping_type) == MAPPING_TYPE__DSO)
- return map__dso_unmap_ip(map, ip);
+ return map__dso_unmap_ip(map, ip_or_rip);
else
- return ip;
+ return ip_or_rip;
}
/* rip/ip <-> addr suitable for passing to `objdump --start-address=` */