diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-03-15 16:52:53 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-03-20 12:19:30 -0400 |
commit | c52202434de2bd3e0c447c6dce992266fd7fc589 (patch) | |
tree | 579b03ee149fe73d46537f530c07437dd801fc76 | |
parent | 2f025ea0bac2f99a2800f43f139f57c226d3b08b (diff) |
perf ui browser: Add vprintf() method
We'll need it for some callbacks for the upcoming
annotation__line_print() routines.
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-t3qiobj4ua38xzsq8cyw9ky5@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/ui/browser.c | 7 | ||||
-rw-r--r-- | tools/perf/ui/browser.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c index 63399af3049f..33c30325885f 100644 --- a/tools/perf/ui/browser.c +++ b/tools/perf/ui/browser.c | |||
@@ -56,12 +56,17 @@ void ui_browser__write_nstring(struct ui_browser *browser __maybe_unused, const | |||
56 | slsmg_write_nstring(msg, width); | 56 | slsmg_write_nstring(msg, width); |
57 | } | 57 | } |
58 | 58 | ||
59 | void ui_browser__vprintf(struct ui_browser *browser __maybe_unused, const char *fmt, va_list args) | ||
60 | { | ||
61 | slsmg_vprintf(fmt, args); | ||
62 | } | ||
63 | |||
59 | void ui_browser__printf(struct ui_browser *browser __maybe_unused, const char *fmt, ...) | 64 | void ui_browser__printf(struct ui_browser *browser __maybe_unused, const char *fmt, ...) |
60 | { | 65 | { |
61 | va_list args; | 66 | va_list args; |
62 | 67 | ||
63 | va_start(args, fmt); | 68 | va_start(args, fmt); |
64 | slsmg_vprintf(fmt, args); | 69 | ui_browser__vprintf(browser, fmt, args); |
65 | va_end(args); | 70 | va_end(args); |
66 | } | 71 | } |
67 | 72 | ||
diff --git a/tools/perf/ui/browser.h b/tools/perf/ui/browser.h index 03e1734412b9..9e69c6a43514 100644 --- a/tools/perf/ui/browser.h +++ b/tools/perf/ui/browser.h | |||
@@ -3,6 +3,7 @@ | |||
3 | #define _PERF_UI_BROWSER_H_ 1 | 3 | #define _PERF_UI_BROWSER_H_ 1 |
4 | 4 | ||
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | #include <stdarg.h> | ||
6 | 7 | ||
7 | #define HE_COLORSET_TOP 50 | 8 | #define HE_COLORSET_TOP 50 |
8 | #define HE_COLORSET_MEDIUM 51 | 9 | #define HE_COLORSET_MEDIUM 51 |
@@ -40,6 +41,7 @@ void ui_browser__reset_index(struct ui_browser *browser); | |||
40 | void ui_browser__gotorc(struct ui_browser *browser, int y, int x); | 41 | void ui_browser__gotorc(struct ui_browser *browser, int y, int x); |
41 | void ui_browser__write_nstring(struct ui_browser *browser, const char *msg, | 42 | void ui_browser__write_nstring(struct ui_browser *browser, const char *msg, |
42 | unsigned int width); | 43 | unsigned int width); |
44 | void ui_browser__vprintf(struct ui_browser *browser, const char *fmt, va_list args); | ||
43 | void ui_browser__printf(struct ui_browser *browser, const char *fmt, ...); | 45 | void ui_browser__printf(struct ui_browser *browser, const char *fmt, ...); |
44 | void ui_browser__write_graph(struct ui_browser *browser, int graph); | 46 | void ui_browser__write_graph(struct ui_browser *browser, int graph); |
45 | void __ui_browser__line_arrow(struct ui_browser *browser, unsigned int column, | 47 | void __ui_browser__line_arrow(struct ui_browser *browser, unsigned int column, |