aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/map.c')
-rw-r--r--tools/perf/util/map.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index 8b3dd467adb5..c4d55a0da2ea 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -104,12 +104,16 @@ void map__fixup_end(struct map *self)
104 104
105#define DSO__DELETED "(deleted)" 105#define DSO__DELETED "(deleted)"
106 106
107static int map__load(struct map *self, struct perf_session *session, 107int map__load(struct map *self, struct perf_session *session,
108 symbol_filter_t filter) 108 symbol_filter_t filter)
109{ 109{
110 const char *name = self->dso->long_name; 110 const char *name = self->dso->long_name;
111 int nr = dso__load(self->dso, self, session, filter); 111 int nr;
112 112
113 if (dso__loaded(self->dso, self->type))
114 return 0;
115
116 nr = dso__load(self->dso, self, session, filter);
113 if (nr < 0) { 117 if (nr < 0) {
114 if (self->dso->has_build_id) { 118 if (self->dso->has_build_id) {
115 char sbuild_id[BUILD_ID_SIZE * 2 + 1]; 119 char sbuild_id[BUILD_ID_SIZE * 2 + 1];
@@ -147,7 +151,7 @@ static int map__load(struct map *self, struct perf_session *session,
147struct symbol *map__find_symbol(struct map *self, struct perf_session *session, 151struct symbol *map__find_symbol(struct map *self, struct perf_session *session,
148 u64 addr, symbol_filter_t filter) 152 u64 addr, symbol_filter_t filter)
149{ 153{
150 if (!dso__loaded(self->dso, self->type) && map__load(self, session, filter) < 0) 154 if (map__load(self, session, filter) < 0)
151 return NULL; 155 return NULL;
152 156
153 return dso__find_symbol(self->dso, self->type, addr); 157 return dso__find_symbol(self->dso, self->type, addr);
@@ -157,7 +161,7 @@ struct symbol *map__find_symbol_by_name(struct map *self, const char *name,
157 struct perf_session *session, 161 struct perf_session *session,
158 symbol_filter_t filter) 162 symbol_filter_t filter)
159{ 163{
160 if (!dso__loaded(self->dso, self->type) && map__load(self, session, filter) < 0) 164 if (map__load(self, session, filter) < 0)
161 return NULL; 165 return NULL;
162 166
163 if (!dso__sorted_by_name(self->dso, self->type)) 167 if (!dso__sorted_by_name(self->dso, self->type))