diff options
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r-- | tools/perf/util/symbol.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index e752837363ee..bfb055459670 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -1076,25 +1076,28 @@ static bool dso__build_id_equal(const struct dso *self, u8 *build_id) | |||
1076 | return memcmp(self->build_id, build_id, sizeof(self->build_id)) == 0; | 1076 | return memcmp(self->build_id, build_id, sizeof(self->build_id)) == 0; |
1077 | } | 1077 | } |
1078 | 1078 | ||
1079 | static bool __dsos__read_build_ids(struct list_head *head) | 1079 | static bool __dsos__read_build_ids(struct list_head *head, bool with_hits) |
1080 | { | 1080 | { |
1081 | bool have_build_id = false; | 1081 | bool have_build_id = false; |
1082 | struct dso *pos; | 1082 | struct dso *pos; |
1083 | 1083 | ||
1084 | list_for_each_entry(pos, head, node) | 1084 | list_for_each_entry(pos, head, node) { |
1085 | if (with_hits && !pos->hit) | ||
1086 | continue; | ||
1085 | if (filename__read_build_id(pos->long_name, pos->build_id, | 1087 | if (filename__read_build_id(pos->long_name, pos->build_id, |
1086 | sizeof(pos->build_id)) > 0) { | 1088 | sizeof(pos->build_id)) > 0) { |
1087 | have_build_id = true; | 1089 | have_build_id = true; |
1088 | pos->has_build_id = true; | 1090 | pos->has_build_id = true; |
1089 | } | 1091 | } |
1092 | } | ||
1090 | 1093 | ||
1091 | return have_build_id; | 1094 | return have_build_id; |
1092 | } | 1095 | } |
1093 | 1096 | ||
1094 | bool dsos__read_build_ids(void) | 1097 | bool dsos__read_build_ids(bool with_hits) |
1095 | { | 1098 | { |
1096 | bool kbuildids = __dsos__read_build_ids(&dsos__kernel), | 1099 | bool kbuildids = __dsos__read_build_ids(&dsos__kernel, with_hits), |
1097 | ubuildids = __dsos__read_build_ids(&dsos__user); | 1100 | ubuildids = __dsos__read_build_ids(&dsos__user, with_hits); |
1098 | return kbuildids || ubuildids; | 1101 | return kbuildids || ubuildids; |
1099 | } | 1102 | } |
1100 | 1103 | ||