aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/symbol.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 651dbfe7f4f3..17df793c8924 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1486,7 +1486,9 @@ int dso__load(struct dso *self, struct map *map, symbol_filter_t filter)
1486 * On the first pass, only load images if they have a full symtab. 1486 * On the first pass, only load images if they have a full symtab.
1487 * Failing that, do a second pass where we accept .dynsym also 1487 * Failing that, do a second pass where we accept .dynsym also
1488 */ 1488 */
1489 for (self->symtab_type = SYMTAB__BUILD_ID_CACHE, want_symtab = 1; 1489 want_symtab = 1;
1490restart:
1491 for (self->symtab_type = SYMTAB__BUILD_ID_CACHE;
1490 self->symtab_type != SYMTAB__NOT_FOUND; 1492 self->symtab_type != SYMTAB__NOT_FOUND;
1491 self->symtab_type++) { 1493 self->symtab_type++) {
1492 switch (self->symtab_type) { 1494 switch (self->symtab_type) {
@@ -1536,17 +1538,7 @@ int dso__load(struct dso *self, struct map *map, symbol_filter_t filter)
1536 snprintf(name, size, "%s%s", symbol_conf.symfs, 1538 snprintf(name, size, "%s%s", symbol_conf.symfs,
1537 self->long_name); 1539 self->long_name);
1538 break; 1540 break;
1539 1541 default:;
1540 default:
1541 /*
1542 * If we wanted a full symtab but no image had one,
1543 * relax our requirements and repeat the search.
1544 */
1545 if (want_symtab) {
1546 want_symtab = 0;
1547 self->symtab_type = SYMTAB__BUILD_ID_CACHE;
1548 } else
1549 continue;
1550 } 1542 }
1551 1543
1552 /* Name is now the name of the next image to try */ 1544 /* Name is now the name of the next image to try */
@@ -1573,6 +1565,15 @@ int dso__load(struct dso *self, struct map *map, symbol_filter_t filter)
1573 } 1565 }
1574 } 1566 }
1575 1567
1568 /*
1569 * If we wanted a full symtab but no image had one,
1570 * relax our requirements and repeat the search.
1571 */
1572 if (ret <= 0 && want_symtab) {
1573 want_symtab = 0;
1574 goto restart;
1575 }
1576
1576 free(name); 1577 free(name);
1577 if (ret < 0 && strstr(self->name, " (deleted)") != NULL) 1578 if (ret < 0 && strstr(self->name, " (deleted)") != NULL)
1578 return 0; 1579 return 0;