• Arnaldo Carvalho de Melo's avatar
    perf hist: Replace ->print() routines by ->snprintf() equivalents · a4e3b956
    Arnaldo Carvalho de Melo authored
    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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    a4e3b956
hist.h 1.27 KB