diff options
author | Namhyung Kim <namhyung@kernel.org> | 2013-02-07 04:02:08 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-02-14 12:59:27 -0500 |
commit | 2b676bf068916046151277f27113f80828e33001 (patch) | |
tree | 2f508debbd3bc103ed64887914d8f65f590950b6 /tools/perf/util/annotate.h | |
parent | e3a34029c635b7dee06e51d99441578b96c7d463 (diff) |
perf ui/gtk: Implement basic GTK2 annotation browser
Basic implementation of perf annotate on GTK2. Currently only
shows first symbol. Add a new --gtk option to use it.
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: Namhyung Kim <namhyung.kim@lge.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-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/annotate.h')
-rw-r--r-- | tools/perf/util/annotate.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h index 8eec94358a4a..a8ccbda4aeb7 100644 --- a/tools/perf/util/annotate.h +++ b/tools/perf/util/annotate.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #include "types.h" | 6 | #include "types.h" |
7 | #include "symbol.h" | 7 | #include "symbol.h" |
8 | #include "hist.h" | 8 | #include "hist.h" |
9 | #include "sort.h" | ||
9 | #include <linux/list.h> | 10 | #include <linux/list.h> |
10 | #include <linux/rbtree.h> | 11 | #include <linux/rbtree.h> |
11 | #include <pthread.h> | 12 | #include <pthread.h> |
@@ -154,6 +155,25 @@ static inline int symbol__tui_annotate(struct symbol *sym __maybe_unused, | |||
154 | } | 155 | } |
155 | #endif | 156 | #endif |
156 | 157 | ||
158 | #ifdef GTK2_SUPPORT | ||
159 | int symbol__gtk_annotate(struct symbol *sym, struct map *map, int evidx, | ||
160 | struct hist_browser_timer *hbt); | ||
161 | |||
162 | static inline int hist_entry__gtk_annotate(struct hist_entry *he, int evidx, | ||
163 | struct hist_browser_timer *hbt) | ||
164 | { | ||
165 | return symbol__gtk_annotate(he->ms.sym, he->ms.map, evidx, hbt); | ||
166 | } | ||
167 | #else | ||
168 | static inline int hist_entry__gtk_annotate(struct hist_entry *he __maybe_unused, | ||
169 | int evidx __maybe_unused, | ||
170 | struct hist_browser_timer *hbt | ||
171 | __maybe_unused) | ||
172 | { | ||
173 | return 0; | ||
174 | } | ||
175 | #endif | ||
176 | |||
157 | extern const char *disassembler_style; | 177 | extern const char *disassembler_style; |
158 | 178 | ||
159 | #endif /* __PERF_ANNOTATE_H */ | 179 | #endif /* __PERF_ANNOTATE_H */ |