From a0088adcd651b8eb1a9ca9c7e6ebe1c2c5fb6273 Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Mon, 3 Mar 2014 10:14:04 +0900 Subject: perf ui/hists: Pass struct hpp to print functions Instead of the pointer to buffer and its size so that it can also get private argument passed along with hpp. This is a preparation of further change. Signed-off-by: Namhyung Kim Cc: Andi Kleen Cc: David Ahern Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1393809254-4480-4-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/ui/gtk/hists.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools/perf/ui/gtk/hists.c') diff --git a/tools/perf/ui/gtk/hists.c b/tools/perf/ui/gtk/hists.c index 3dab00e748f2..430fd555b161 100644 --- a/tools/perf/ui/gtk/hists.c +++ b/tools/perf/ui/gtk/hists.c @@ -8,12 +8,14 @@ #define MAX_COLUMNS 32 -static int __percent_color_snprintf(char *buf, size_t size, const char *fmt, ...) +static int __percent_color_snprintf(struct perf_hpp *hpp, const char *fmt, ...) { int ret = 0; va_list args; double percent; const char *markup; + char *buf = hpp->buf; + size_t size = hpp->size; va_start(args, fmt); percent = va_arg(args, double); -- cgit v1.2.3