diff options
author | Namhyung Kim <namhyung@kernel.org> | 2014-03-03 10:14:03 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-03-14 18:08:38 -0300 |
commit | 4a62109fe94f68a57b239c1516f97497a4d15c14 (patch) | |
tree | 23c29b70f99eec34e3f929d95e6c6accb4d875c1 /tools/perf/util/hist.h | |
parent | 9b0d2fb86d4737b2cda39bc9c9a8e368cec38960 (diff) | |
download | linux-stable-4a62109fe94f68a57b239c1516f97497a4d15c14.tar.gz linux-stable-4a62109fe94f68a57b239c1516f97497a4d15c14.tar.bz2 linux-stable-4a62109fe94f68a57b239c1516f97497a4d15c14.zip |
perf ui/gtk: Reuse generic __hpp__fmt() code
The __hpp__color_fmt used in the gtk code can be replace by the generic
code with small change in print_fn callback.
This is a preparation to upcoming changes and no functional changes
intended.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Pekka Enberg <penberg@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: Pekka Enberg <penberg@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1393809254-4480-3-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 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index a59743fa3ef7..97f924ec6af9 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h @@ -166,6 +166,12 @@ void perf_hpp__init(void); void perf_hpp__column_register(struct perf_hpp_fmt *format); void perf_hpp__column_enable(unsigned col); +typedef int (*hpp_snprint_fn)(char *buf, size_t size, const char *fmt, ...); + +int __hpp__fmt(struct perf_hpp *hpp, struct hist_entry *he, + u64 (*get_field)(struct hist_entry *), + const char *fmt, hpp_snprint_fn print_fn, bool fmt_percent); + static inline size_t perf_hpp__use_color(void) { return !symbol_conf.field_sep; |