• Martin Liška's avatar
    perf annotate: Add line number like in TUI and source location at EOL · f89a82a8
    Martin Liška authored
    The patch changes the output format in 2 ways:
    - line number is displayed for all source lines (matching TUI mode)
    - source locations for the hottest lines are printed
       at the line end in order to preserve layout
    
    Before:
    
         0.00 :   405ef1: inc    %r15
              :            tmpsd * (TD + tmpsd * TDD)));
         0.01 :   405ef4: vfmadd213sd 0x2b9b3(%rip),%xmm0,%xmm3        # 4318b0 <_IO_stdin_used+0x8b0>
              :            tmpsd * (TC +
      eff.c:1811    0.67 :   405efd: vfmadd213sd 0x2b9b2(%rip),%xmm0,%xmm3        # 4318b8 <_IO_stdin_used+0x8b8>
              :            TA + tmpsd * (TB +
         0.35 :   405f06: vfmadd213sd 0x2b9b1(%rip),%xmm0,%xmm3        # 4318c0 <_IO_stdin_used+0x8c0>
              :            dumbo =
      eff.c:1809    1.41 :   405f0f: vfmadd213sd 0x2b9b0(%rip),%xmm0,%xmm3        # 4318c8 <_IO_stdin_used+0x8c8>
              :            sumi -= sj * tmpsd * dij2i * dumbo;
      eff.c:1813    2.58 :   405f18: vmulsd %xmm3,%xmm0...
    f89a82a8
annotate.c 78.9 KB