• Namhyung Kim's avatar
    perf hists browser: Cleanup callchain print functions · c09a7e75
    Namhyung Kim authored
    The hist_browser__show_callchain() and friends don't need to be that
    complex.  They're splitted in 3 pieces - one for traversing top-level
    tree, other one for special casing first chains in the top-level
    entries, and last one for recursive traversing inner trees.  It led to
    code duplication and unnecessary complexity IMHO.
    
    Simplify the function and consolidate the logic into a single function
    - it can recursively call itself.  A little difference in printing
      callchains in top-level tree can be handled with a small change.
    
    It should have no functional change.
    Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
    Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
    Cc: Andi Kleen <andi@firstfloor.org>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Frederic Weisbecker <fweisbec@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: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/1408583746-5540-2-git-send-email-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    c09a7e75
hists.c 51.6 KB