summaryrefslogtreecommitdiff
path: root/tools/perf/ui/gtk/hists.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2014-03-03 05:14:04 +0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-03-15 01:08:38 +0400
commita0088adcd651b8eb1a9ca9c7e6ebe1c2c5fb6273 (patch)
treec28143096e14256cbdc34c19f97713fb57685091 /tools/perf/ui/gtk/hists.c
parent4a62109fe94f68a57b239c1516f97497a4d15c14 (diff)
downloadlinux-a0088adcd651b8eb1a9ca9c7e6ebe1c2c5fb6273.tar.xz
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 <namhyung@kernel.org> Cc: Andi Kleen <andi@firstfloor.org> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1393809254-4480-4-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/gtk/hists.c')
-rw-r--r--tools/perf/ui/gtk/hists.c4
1 files changed, 3 insertions, 1 deletions
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);