]> git.karo-electronics.de Git - linux-beck.git/commit
perf hist: Replace ->print() routines by ->snprintf() equivalents
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 31 Mar 2010 14:33:40 +0000 (11:33 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 2 Apr 2010 19:28:15 +0000 (16:28 -0300)
commita4e3b956a820162b7c1d616117b4f23b6017f504
tree370116b6f6f4f8d3410a14831d394cf4993d04d8
parent70162138c91b040da3162fe1f34fe8aaf6506f10
perf hist: Replace ->print() routines by ->snprintf() equivalents

Then hist_entry__fprintf will just us the newly introduced
hist_entry__snprintf, add the newline and fprintf it to the supplied
FILE descriptor.

This allows us to remove the use_browser checking in the color_printf
routines, that now got color_snprintf variants too.

The newt TUI browser (and other GUIs that may come in the future) don't
have to worry about stdio specific stuff in the strings they get from
the se->snprintf routines and instead use whatever means to do the
equivalent.

Also the newt TUI browser don't have to use the fmemopen() hack, instead
it can use the se->snprintf routines directly. For now tho use the
hist_entry__snprintf routine to reduce the patch size.

Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/color.c
tools/perf/util/color.h
tools/perf/util/hist.c
tools/perf/util/hist.h
tools/perf/util/newt.c
tools/perf/util/sort.c
tools/perf/util/sort.h