Skip to content

Commit

Permalink
perf probe: Fix multiple --vars options behavior
Browse files Browse the repository at this point in the history
Fix a bug that perf-probe fails to initialize libdwfl and shows incorrect error
when user gives multiple --vars options.

Cc: [email protected]
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Lin Ming <[email protected]>
Cc: Peter Zijlstra <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
mhiramathitachi authored and acmel committed Apr 5, 2011
1 parent f0c4801 commit cc44644
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tools/perf/util/probe-event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit cc44644

Please sign in to comment.