X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=tools%2Fperf%2Futil%2Fannotate.c;h=3aa555ff9d89e5d7ede4c6af067170197b9ce0e8;hb=e1aa17c7b52c2cc1a4c20f62deadcd94ce8b632c;hp=469eb679fb9d09d9e96e8687cc2051fa44f86565;hpb=08d21b5f93eb92a781daea71b6fcb3a340909141;p=~andy%2Flinux diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 469eb679fb9..3aa555ff9d8 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -8,6 +8,8 @@ */ #include "util.h" +#include "ui/ui.h" +#include "sort.h" #include "build-id.h" #include "color.h" #include "cache.h" @@ -489,7 +491,7 @@ static int symbol__inc_addr_samples(struct symbol *sym, struct map *map, { struct annotation *notes; - if (sym == NULL || use_browser != 1 || !sort__has_sym) + if (sym == NULL) return 0; notes = symbol__annotation(sym); @@ -1399,3 +1401,8 @@ int hist_entry__annotate(struct hist_entry *he, size_t privsize) { return symbol__annotate(he->ms.sym, he->ms.map, privsize); } + +bool ui__has_annotation(void) +{ + return use_browser == 1 && sort__has_sym; +}