summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2013-02-07 18:02:13 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-02-14 14:59:28 -0300
commitc0e79be74907b4654b622601692e1a27fd1dbeb3 (patch)
tree1b42d81a1f71ad0b18c0b5461e281997cf25abd2 /tools
parent237522378604a2e26e19a8b11a70171eaf98c6c5 (diff)
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 <namhyung@kernel.org> Cc: Andi Kleen <andi@firstfloor.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Pekka Enberg <penberg@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1360227734-375-7-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/ui/gtk/annotate.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/perf/ui/gtk/annotate.c b/tools/perf/ui/gtk/annotate.c
index 2fe056b0096..7d8dc581a54 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;