diff options
Diffstat (limited to 'tools/perf/util/annotate.h')
| -rw-r--r-- | tools/perf/util/annotate.h | 34 | 
1 files changed, 29 insertions, 5 deletions
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h index 39242dcee8f..c422440fe61 100644 --- a/tools/perf/util/annotate.h +++ b/tools/perf/util/annotate.h @@ -5,6 +5,8 @@  #include <stdint.h>  #include "types.h"  #include "symbol.h" +#include "hist.h" +#include "sort.h"  #include <linux/list.h>  #include <linux/rbtree.h>  #include <pthread.h> @@ -75,6 +77,7 @@ struct sym_hist {  struct source_line {  	struct rb_node	node;  	double		percent; +	double		percent_sum;  	char		*path;  }; @@ -140,20 +143,41 @@ int symbol__tty_annotate(struct symbol *sym, struct map *map, int evidx,  #ifdef NEWT_SUPPORT  int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx, -			 void(*timer)(void *arg), void *arg, int delay_secs); +			 struct hist_browser_timer *hbt);  #else  static inline int symbol__tui_annotate(struct symbol *sym __maybe_unused,  				       struct map *map __maybe_unused,  				       int evidx __maybe_unused, -				       void(*timer)(void *arg) __maybe_unused, -				       void *arg __maybe_unused, -				       int delay_secs __maybe_unused) +				       struct hist_browser_timer *hbt +				       __maybe_unused)  {  	return 0;  }  #endif +#ifdef GTK2_SUPPORT +int symbol__gtk_annotate(struct symbol *sym, struct map *map, int evidx, +			 struct hist_browser_timer *hbt); + +static inline int hist_entry__gtk_annotate(struct hist_entry *he, int evidx, +					   struct hist_browser_timer *hbt) +{ +	return symbol__gtk_annotate(he->ms.sym, he->ms.map, evidx, hbt); +} + +void perf_gtk__show_annotations(void); +#else +static inline int hist_entry__gtk_annotate(struct hist_entry *he __maybe_unused, +					   int evidx __maybe_unused, +					   struct hist_browser_timer *hbt +					   __maybe_unused) +{ +	return 0; +} + +static inline void perf_gtk__show_annotations(void) {} +#endif +  extern const char	*disassembler_style; -extern const char	*objdump_path;  #endif	/* __PERF_ANNOTATE_H */  |