diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/probe-event.c | 2 | ||||
-rw-r--r-- | tools/perf/util/probe-finder.c | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 369ddc64bbb6..5ddee66020a7 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c | |||
@@ -1832,7 +1832,7 @@ int add_perf_probe_events(struct perf_probe_event *pevs, int npevs, | |||
1832 | } | 1832 | } |
1833 | 1833 | ||
1834 | /* Loop 2: add all events */ | 1834 | /* Loop 2: add all events */ |
1835 | for (i = 0; i < npevs && ret >= 0; i++) { | 1835 | for (i = 0; i < npevs; i++) { |
1836 | ret = __add_probe_trace_events(pkgs[i].pev, pkgs[i].tevs, | 1836 | ret = __add_probe_trace_events(pkgs[i].pev, pkgs[i].tevs, |
1837 | pkgs[i].ntevs, force_add); | 1837 | pkgs[i].ntevs, force_add); |
1838 | if (ret < 0) | 1838 | if (ret < 0) |
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index eecbdca5c0d5..17f9c4a66ddd 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c | |||
@@ -1462,8 +1462,7 @@ static int find_probes(int fd, struct probe_finder *pf) | |||
1462 | off = 0; | 1462 | off = 0; |
1463 | line_list__init(&pf->lcache); | 1463 | line_list__init(&pf->lcache); |
1464 | /* Loop on CUs (Compilation Unit) */ | 1464 | /* Loop on CUs (Compilation Unit) */ |
1465 | while (!dwarf_nextcu(dbg, off, &noff, &cuhl, NULL, NULL, NULL) && | 1465 | while (!dwarf_nextcu(dbg, off, &noff, &cuhl, NULL, NULL, NULL)) { |
1466 | ret >= 0) { | ||
1467 | /* Get the DIE(Debugging Information Entry) of this CU */ | 1466 | /* Get the DIE(Debugging Information Entry) of this CU */ |
1468 | diep = dwarf_offdie(dbg, off + cuhl, &pf->cu_die); | 1467 | diep = dwarf_offdie(dbg, off + cuhl, &pf->cu_die); |
1469 | if (!diep) | 1468 | if (!diep) |
@@ -1484,7 +1483,7 @@ static int find_probes(int fd, struct probe_finder *pf) | |||
1484 | pf->lno = pp->line; | 1483 | pf->lno = pp->line; |
1485 | ret = find_probe_point_by_line(pf); | 1484 | ret = find_probe_point_by_line(pf); |
1486 | } | 1485 | } |
1487 | if (ret != DWARF_CB_OK) | 1486 | if (ret < 0) |
1488 | break; | 1487 | break; |
1489 | } | 1488 | } |
1490 | off = noff; | 1489 | off = noff; |