diff options
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r-- | tools/perf/util/symbol.c | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index f1f609dcf9a1..26ec603083e0 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -1578,6 +1578,27 @@ static int dso__load_vmlinux(struct dso *self, struct map *map, | |||
1578 | return err; | 1578 | return err; |
1579 | } | 1579 | } |
1580 | 1580 | ||
1581 | int dso__load_vmlinux_path(struct dso *self, struct map *map, | ||
1582 | struct perf_session *session, symbol_filter_t filter) | ||
1583 | { | ||
1584 | int i, err = 0; | ||
1585 | |||
1586 | pr_debug("Looking at the vmlinux_path (%d entries long)\n", | ||
1587 | vmlinux_path__nr_entries); | ||
1588 | |||
1589 | for (i = 0; i < vmlinux_path__nr_entries; ++i) { | ||
1590 | err = dso__load_vmlinux(self, map, session, vmlinux_path[i], | ||
1591 | filter); | ||
1592 | if (err > 0) { | ||
1593 | pr_debug("Using %s for symbols\n", vmlinux_path[i]); | ||
1594 | dso__set_long_name(self, strdup(vmlinux_path[i])); | ||
1595 | break; | ||
1596 | } | ||
1597 | } | ||
1598 | |||
1599 | return err; | ||
1600 | } | ||
1601 | |||
1581 | static int dso__load_kernel_sym(struct dso *self, struct map *map, | 1602 | static int dso__load_kernel_sym(struct dso *self, struct map *map, |
1582 | struct perf_session *session, symbol_filter_t filter) | 1603 | struct perf_session *session, symbol_filter_t filter) |
1583 | { | 1604 | { |
@@ -1606,20 +1627,9 @@ static int dso__load_kernel_sym(struct dso *self, struct map *map, | |||
1606 | } | 1627 | } |
1607 | 1628 | ||
1608 | if (vmlinux_path != NULL) { | 1629 | if (vmlinux_path != NULL) { |
1609 | int i; | 1630 | err = dso__load_vmlinux_path(self, map, session, filter); |
1610 | pr_debug("Looking at the vmlinux_path (%d entries long)\n", | 1631 | if (err > 0) |
1611 | vmlinux_path__nr_entries); | 1632 | goto out_fixup; |
1612 | for (i = 0; i < vmlinux_path__nr_entries; ++i) { | ||
1613 | err = dso__load_vmlinux(self, map, session, | ||
1614 | vmlinux_path[i], filter); | ||
1615 | if (err > 0) { | ||
1616 | pr_debug("Using %s for symbols\n", | ||
1617 | vmlinux_path[i]); | ||
1618 | dso__set_long_name(self, | ||
1619 | strdup(vmlinux_path[i])); | ||
1620 | goto out_fixup; | ||
1621 | } | ||
1622 | } | ||
1623 | } | 1633 | } |
1624 | 1634 | ||
1625 | /* | 1635 | /* |