diff options
author | Namhyung Kim <namhyung@kernel.org> | 2014-03-02 20:14:04 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-03-14 17:08:38 -0400 |
commit | a0088adcd651b8eb1a9ca9c7e6ebe1c2c5fb6273 (patch) | |
tree | c28143096e14256cbdc34c19f97713fb57685091 /tools/perf/ui/gtk/hists.c | |
parent | 4a62109fe94f68a57b239c1516f97497a4d15c14 (diff) |
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.c | 4 |
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 @@ | |||
8 | 8 | ||
9 | #define MAX_COLUMNS 32 | 9 | #define MAX_COLUMNS 32 |
10 | 10 | ||
11 | static int __percent_color_snprintf(char *buf, size_t size, const char *fmt, ...) | 11 | static int __percent_color_snprintf(struct perf_hpp *hpp, const char *fmt, ...) |
12 | { | 12 | { |
13 | int ret = 0; | 13 | int ret = 0; |
14 | va_list args; | 14 | va_list args; |
15 | double percent; | 15 | double percent; |
16 | const char *markup; | 16 | const char *markup; |
17 | char *buf = hpp->buf; | ||
18 | size_t size = hpp->size; | ||
17 | 19 | ||
18 | va_start(args, fmt); | 20 | va_start(args, fmt); |
19 | percent = va_arg(args, double); | 21 | percent = va_arg(args, double); |