summaryrefslogtreecommitdiff
path: root/tools/perf/util/annotate.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2018-03-15 17:54:36 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-03-20 13:19:30 -0300
commit2ba5eca10486eeb37030f8bce27cecda3763502f (patch)
tree9716939204c684cbf04f53d6984b6cd691cb4a84 /tools/perf/util/annotate.h
parentc52202434de2bd3e0c447c6dce992266fd7fc589 (diff)
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 <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jin Yao <yao.jin@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-1o7az1ng55g2g6ppr2jpeuct@git.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.h5
1 files changed, 5 insertions, 0 deletions
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);