summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/map.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/map.h')
-rw-r--r--tools/perf/util/map.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h
index 579ad7d2711d..d035d8f0d5b2 100644
--- a/tools/perf/util/map.h
+++ b/tools/perf/util/map.h
@@ -222,7 +222,8 @@ static inline struct map *__map_groups__find(struct map_groups *mg,
static inline struct map *map_groups__find(struct map_groups *mg, u64 addr)
{
- return __map_groups__find(mg, MAP__FUNCTION, addr);
+ struct map *map = __map_groups__find(mg, MAP__FUNCTION, addr);
+ return map ?: __map_groups__find(mg, MAP__VARIABLE, addr);
}
struct map *map_groups__first(struct map_groups *mg);