[PATCH 5/6] perf top: Fix reporting of invalid --vmlinux

From: Arnaldo Carvalho de Melo
Date: Tue Mar 01 2011 - 12:04:24 EST


From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

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 <fweisbec@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: Mike Galbraith <efault@xxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
Cc: Tom Zanussi <tzanussi@xxxxxxxxx>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/builtin-top.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index f88a263..0b07cc3 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -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);
}

--
1.6.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/