diff options
-rw-r--r-- | tools/perf/builtin-probe.c | 18 | ||||
-rw-r--r-- | tools/perf/util/probe-finder.c | 4 |
2 files changed, 12 insertions, 10 deletions
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index 919037bc9808..438a7bb101d3 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c | |||
@@ -261,15 +261,19 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used) | |||
261 | 261 | ||
262 | lseek(fd, SEEK_SET, 0); | 262 | lseek(fd, SEEK_SET, 0); |
263 | ret = find_probepoint(fd, pp); | 263 | ret = find_probepoint(fd, pp); |
264 | if (ret < 0) { | 264 | if (ret > 0) |
265 | if (session.need_dwarf) | 265 | continue; |
266 | die("Could not analyze debuginfo."); | ||
267 | |||
268 | pr_warning("An error occurred in debuginfo analysis. Try to use symbols.\n"); | ||
269 | break; | ||
270 | } | ||
271 | if (ret == 0) /* No error but failed to find probe point. */ | 266 | if (ret == 0) /* No error but failed to find probe point. */ |
272 | die("No probe point found."); | 267 | die("No probe point found."); |
268 | /* Error path */ | ||
269 | if (session.need_dwarf) { | ||
270 | if (ret == -ENOENT) | ||
271 | pr_warning("No dwarf info found in the vmlinux - please rebuild with CONFIG_DEBUG_INFO=y.\n"); | ||
272 | die("Could not analyze debuginfo."); | ||
273 | } | ||
274 | pr_debug("An error occurred in debuginfo analysis." | ||
275 | " Try to use symbols.\n"); | ||
276 | break; | ||
273 | } | 277 | } |
274 | close(fd); | 278 | close(fd); |
275 | 279 | ||
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 4585f1d86792..4b852c0d16a5 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c | |||
@@ -687,10 +687,8 @@ int find_probepoint(int fd, struct probe_point *pp) | |||
687 | struct probe_finder pf = {.pp = pp}; | 687 | struct probe_finder pf = {.pp = pp}; |
688 | 688 | ||
689 | ret = dwarf_init(fd, DW_DLC_READ, 0, 0, &__dw_debug, &__dw_error); | 689 | ret = dwarf_init(fd, DW_DLC_READ, 0, 0, &__dw_debug, &__dw_error); |
690 | if (ret != DW_DLV_OK) { | 690 | if (ret != DW_DLV_OK) |
691 | pr_warning("No dwarf info found in the vmlinux - please rebuild with CONFIG_DEBUG_INFO.\n"); | ||
692 | return -ENOENT; | 691 | return -ENOENT; |
693 | } | ||
694 | 692 | ||
695 | pp->found = 0; | 693 | pp->found = 0; |
696 | while (++cu_number) { | 694 | while (++cu_number) { |