From: Namhyung Kim Date: Thu, 7 Feb 2013 09:02:13 +0000 (+0900) Subject: perf gtk/annotate: Fail early if it can't annotate X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c0e79be74907b4654b622601692e1a27fd1dbeb3;p=openwrt%2Fstaging%2Fblogic.git perf gtk/annotate: Fail early if it can't annotate Don't need to setup a browser window if annotate cannot work. Signed-off-by: Namhyung Kim Cc: Andi Kleen Cc: Borislav Petkov Cc: Ingo Molnar Cc: Jiri Olsa Cc: Paul Mackerras Cc: Pekka Enberg Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1360227734-375-7-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/ui/gtk/annotate.c b/tools/perf/ui/gtk/annotate.c index 2fe056b0096c..7d8dc581a545 100644 --- a/tools/perf/ui/gtk/annotate.c +++ b/tools/perf/ui/gtk/annotate.c @@ -97,14 +97,6 @@ static int perf_gtk__annotate_symbol(GtkWidget *window, struct symbol *sym, int i; char s[512]; - if (map->dso->annotate_warned) - return -1; - - if (symbol__annotate(sym, map, 0) < 0) { - ui__error("%s", ui_helpline__current); - return -1; - } - notes = symbol__annotation(sym); for (i = 0; i < MAX_ANN_COLS; i++) { @@ -155,6 +147,14 @@ int symbol__gtk_annotate(struct symbol *sym, struct map *map, int evidx, GtkWidget *scrolled_window; GtkWidget *tab_label; + if (map->dso->annotate_warned) + return -1; + + if (symbol__annotate(sym, map, 0) < 0) { + ui__error("%s", ui_helpline__current); + return -1; + } + if (perf_gtk__is_active_context(pgctx)) { window = pgctx->main_window; notebook = pgctx->notebook;