]> git.baikalelectronics.ru Git - kernel.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)
commitd004cc7f025d40b3b189e268e8afd228031da43a
tree370116b6f6f4f8d3410a14831d394cf4993d04d8
parent57f0e51df7258e647ab990075d18e5faf889ed30
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