From 2ba5eca10486eeb37030f8bce27cecda3763502f Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Thu, 15 Mar 2018 17:54:36 -0300 Subject: perf annotate: Introduce annotation_line__print_start() out of TUI code For the --tui and --stdio2 cases using callbacks for print() and set_percent_color() end up being the easiest path, real GUI remains as an exercise. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-1o7az1ng55g2g6ppr2jpeuct@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/annotate.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/perf/util/annotate.h') diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h index 83484e236f33..84c99774bfed 100644 --- a/tools/perf/util/annotate.h +++ b/tools/perf/util/annotate.h @@ -126,6 +126,11 @@ struct annotation_line * annotation_line__next(struct annotation_line *pos, struct list_head *head); double annotation_line__max_percent(struct annotation_line *al, struct annotation *notes); +void annotation_line__print_start(struct annotation_line *al, struct annotation *notes, + bool first_line, bool current_entry, + void *obj, + void (*obj__set_percent_color)(void *obj, double percent, bool current), + void (*obj__printf)(void *obj, const char *fmt, ...)); int disasm_line__scnprintf(struct disasm_line *dl, char *bf, size_t size, bool raw); size_t disasm__fprintf(struct list_head *head, FILE *fp); -- cgit v1.2.3