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/util/hist.h | |
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/util/hist.h')
-rw-r--r-- | tools/perf/util/hist.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index 97f924ec6af9..d51ed9898229 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h | |||
@@ -166,12 +166,18 @@ void perf_hpp__init(void); | |||
166 | void perf_hpp__column_register(struct perf_hpp_fmt *format); | 166 | void perf_hpp__column_register(struct perf_hpp_fmt *format); |
167 | void perf_hpp__column_enable(unsigned col); | 167 | void perf_hpp__column_enable(unsigned col); |
168 | 168 | ||
169 | typedef int (*hpp_snprint_fn)(char *buf, size_t size, const char *fmt, ...); | 169 | typedef int (*hpp_snprint_fn)(struct perf_hpp *hpp, const char *fmt, ...); |
170 | 170 | ||
171 | int __hpp__fmt(struct perf_hpp *hpp, struct hist_entry *he, | 171 | int __hpp__fmt(struct perf_hpp *hpp, struct hist_entry *he, |
172 | u64 (*get_field)(struct hist_entry *), | 172 | u64 (*get_field)(struct hist_entry *), |
173 | const char *fmt, hpp_snprint_fn print_fn, bool fmt_percent); | 173 | const char *fmt, hpp_snprint_fn print_fn, bool fmt_percent); |
174 | 174 | ||
175 | static inline void advance_hpp(struct perf_hpp *hpp, int inc) | ||
176 | { | ||
177 | hpp->buf += inc; | ||
178 | hpp->size -= inc; | ||
179 | } | ||
180 | |||
175 | static inline size_t perf_hpp__use_color(void) | 181 | static inline size_t perf_hpp__use_color(void) |
176 | { | 182 | { |
177 | return !symbol_conf.field_sep; | 183 | return !symbol_conf.field_sep; |