Skip to contentSkip to conversation

perf top: Fix reporting of invalid --vmlinux

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Mar 2, 2011 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  374cfe56892701f062586d6a6de6cb71777a4184
Gitweb:     http://git.kernel.org/tip/374cfe56892701f062586d6a6de6cb71777a4184
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Tue, 1 Mar 2011 10:27:27 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 1 Mar 2011 10:27:27 -0300

perf top: Fix reporting of invalid --vmlinux

Using ui__warning, that will, in --tui, show a window with the message, waiting for the user to press Ok.

Also run exit_browser() to let newt do its final cleaning of the screen.

Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Tom Zanussi <[email protected]>
LKML-Reference: <new-submission>

---
 tools/perf/builtin-top.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
tools/perf/builtin-top.c +3 -2
index f88a263..0b07cc3 100644
@@ -740,8 +740,9 @@ static void perf_event__process_sample(const union perf_event *event,
 		 */
 		if (al.map == machine->vmlinux_maps[MAP__FUNCTION] &&
 		    RB_EMPTY_ROOT(&al.map->dso->symbols[MAP__FUNCTION])) {
-			pr_err("The %s file can't be used\n",
-			       symbol_conf.vmlinux_name);
+			ui__warning("The %s file can't be used\n",
+				    symbol_conf.vmlinux_name);
+			exit_browser(0);
 			exit(1);
 		}