• Arnaldo Carvalho de Melo's avatar
    perf top: Auto adjust symbol and dso widths · 13cc5079
    Arnaldo Carvalho de Melo authored
    We pre-calculate the symbol name length, then after we sort the
    entries to print, calculate the biggest one and use that for the
    symbol name width justification, then use the
    dso->long_name->len to justificate the DSO name, deciding whether
    using the short or long name depending on how much space we have
    on the terminal.
    
    IOW give as much info to the user as the terminal width allows.
    Suggested-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    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>
    LKML-Reference: <1258479655-28662-2-git-send-email-acme@infradead.org>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    13cc5079
builtin-top.c 30.2 KB