aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/annotate.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <[email protected]>2018-03-15 20:54:36 +0000
committerArnaldo Carvalho de Melo <[email protected]>2018-03-20 16:19:30 +0000
commit2ba5eca10486eeb37030f8bce27cecda3763502f (patch)
tree9716939204c684cbf04f53d6984b6cd691cb4a84 /tools/perf/util/annotate.h
parentperf ui browser: Add vprintf() method (diff)
downloadkernel-2ba5eca10486eeb37030f8bce27cecda3763502f.tar.gz
kernel-2ba5eca10486eeb37030f8bce27cecda3763502f.zip
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 <[email protected]> Cc: Andi Kleen <[email protected]> Cc: David Ahern <[email protected]> Cc: Jin Yao <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: https://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
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);