• Namhyung Kim's avatar
    perf hists: Link hist entries before inserting to an output tree · ce74f60e
    Namhyung Kim authored
    For matching and/or linking hist entries, they need to be sorted by
    given sort keys.  However current hists__match/link did this on the
    output trees, so that the entries in the output tree need to be resort
    before doing it.
    
    This looks not so good since we have trees for collecting or collapsing
    entries before passing them to an output tree and they're already sorted
    by the given sort keys.  Since we don't need to print anything at the
    time of matching/linking, we can use these internal trees directly
    instead of bothering with double resort on the output tree.
    
    Its only user - at the time of this writing - perf diff can be easily
    converted to use the internal tree and can save some lines too by
    getting rid of unnecessary resorting codes.
    Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
    Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Stephane Eranian <eranian@google.com>
    Link: http://lkml.kernel.org/r/1355128197-18193-3-git-send-email-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    ce74f60e
builtin-diff.c 13.7 KB