• Namhyung Kim's avatar
    perf annotate: Merge same lines in summary view · 41127965
    Namhyung Kim authored
    The --print-line option of perf annotate command shows summary for
    each source line.  But it didn't merge same lines so that it can
    appear multiple times.
    
    * before:
    
      Sorted summary for file /home/namhyung/bin/mcol
      ----------------------------------------------
         21.71 /home/namhyung/tmp/mcol.c:26
         20.66 /home/namhyung/tmp/mcol.c:25
          9.53 /home/namhyung/tmp/mcol.c:24
          7.68 /home/namhyung/tmp/mcol.c:25
          7.67 /home/namhyung/tmp/mcol.c:25
          7.66 /home/namhyung/tmp/mcol.c:26
          7.49 /home/namhyung/tmp/mcol.c:26
          6.92 /home/namhyung/tmp/mcol.c:25
          6.81 /home/namhyung/tmp/mcol.c:25
          1.07 /home/namhyung/tmp/mcol.c:26
          0.52 /home/namhyung/tmp/mcol.c:25
          0.51 /home/namhyung/tmp/mcol.c:25
          0.51 /home/namhyung/tmp/mcol.c:24
    
    * after:
    
      Sorted summary for file /home/namhyung/bin/mcol
      ----------------------------------------------
         50.77 /home/namhyung/tmp/mcol.c:25
         37.94 /home/namhyung/tmp/mcol.c:26
         10.04 /home/namhyung/tmp/mcol.c:24
    
    To do that, introduce percent_sum field so that the normal
    line-by-line output doesn't get changed.
    Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/1352440729-21848-1-git-send-email-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    41127965
annotate.h 4.14 KB