lkml.org 
[lkml]   [2011]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -tip 03/12] [BUGFIX]perf probe: Fix multiple --vars options behavior
Date
Fix a bug that perf-probe fails to initialize libdwfl and
shows incorrect error when user gives multiple --vars options.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
---

tools/perf/util/probe-event.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index a372d74..f022316 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -510,18 +510,18 @@ int show_available_vars(struct perf_probe_event *pevs, int npevs,
if (ret < 0)
return ret;

- fd = open_vmlinux(module);
- if (fd < 0) {
- pr_warning("Failed to open debug information file.\n");
- return fd;
- }
-
setup_pager();

- for (i = 0; i < npevs && ret >= 0; i++)
+ for (i = 0; i < npevs && ret >= 0; i++) {
+ fd = open_vmlinux(module);
+ if (fd < 0) {
+ pr_warning("Failed to open debug information file.\n");
+ ret = fd;
+ break;
+ }
ret = show_available_vars_at(fd, &pevs[i], max_vls, _filter,
externs);
-
+ }
return ret;
}



\
 
 \ /
  Last update: 2011-03-30 11:35    [W:0.261 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site