1. 27 Apr, 2012 1 commit
    • Ingo Molnar's avatar
      Merge tag 'perf-annotate-for-mingo' of... · 1fa2e84d
      Ingo Molnar authored
      Merge tag 'perf-annotate-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Annotation improvements:
      
      Now the default annotate browser uses a much more compact format, implementing
      suggestions made made by several people, notably Linus.
      
      Here is part of the new __list_del_entry() annotation:
      
      __list_del_entry
          8.47 │      push   %rbp
          8.47 │      mov    (%rdi),%rdx
         20.34 │      mov    $0xdead000000100100,%rcx
          3.39 │      mov    0x8(%rdi),%rax
          0.00 │      mov    %rsp,%rbp
          1.69 │      cmp    %rcx,%rdx
          0.00 │      je     43
          1.69 │      mov    $0xdead000000200200,%rcx
          3.39 │      cmp    %rcx,%rax
          0.00 │      je     a3
          5.08 │      mov    (%rax),%r8
         18.64 │      cmp    %r8,%rdi
          0.00 │      jne    84
          1.69 │      mov    0x8(%rdx),%r8
         25.42 │      cmp    %r8,%rdi
          0.00 │      jne    65
          1.69 │      mov    %rax,0x8(%rdx)
          0.00 │      mov    %rdx,(%rax)
          0.00 │      leaveq
          0.00 │      retq
          0.00 │ 43:  mov    %rdx,%r8
          0.00 │      mov    %rdi,%rcx
          0.00 │      mov    $0xffffffff817cd6a8,%rdx
          0.00 │      mov    $0x31,%esi
          0.00 │      mov    $0xffffffff817cd6e0,%rdi
          0.00 │      xor    %eax,%eax
          0.00 │      callq  ffffffff8104eab0 <warn_slowpath_fmt>
          0.00 │      leaveq
          0.00 │      retq
          0.00 │ 65:  mov    %rdi,%rcx
          0.00 │      mov    $0xffffffff817cd780,%rdx
          0.00 │      mov    $0x3a,%esi
          0.00 │      mov    $0xffffffff817cd6e0,%rdi
          0.00 │      xor    %eax,%eax
          0.00 │      callq  ffffffff8104eab0 <warn_slowpath_fmt>
          0.00 │      leaveq
          0.00 │      retq
      
      The infrastructure is there to provide formatters for any instruction,
      like the one I'll do for call functions to elide the address.
      
      Further fixes on top of the first iteration:
      
      - Sometimes a jump points to an offset with no instructions, make the
        mark jump targets function handle that, for now just ignoring such
        jump targets, more investigation is needed to figure out how to cope
        with that.
      
      - Handle jump targets that are outside the function, for now just don't
        try to draw the connector arrow, right thing seems to be to mark this
        jump with a -> (right arrow) and handle it like a callq.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      1fa2e84d
  2. 26 Apr, 2012 4 commits
  3. 25 Apr, 2012 5 commits
  4. 24 Apr, 2012 1 commit
    • Arnaldo Carvalho de Melo's avatar
      perf annotate browser: Initial loop detection · a3f895be
      Arnaldo Carvalho de Melo authored
      Simple algorithm, just look for the next backward jump that points to
      before the cursor.
      
      Then draw an arrow connecting the jump to its target.
      
      Do this as you move the cursor, entering/exiting possible loops.
      
      Ex (graph chars replaced to avoid mail encoding woes):
      
      avc_has_perm_flags
          0.00 |         nopl   0x0(%rax)
          5.36 |+-> 68:  mov    (%rax),%rax
          5.15 ||        test   %rax,%rax
          0.00 ||      v je     130
          2.96 ||   74:  cmp    -0x20(%rax),%ebx
         47.38 ||        lea    -0x20(%rax),%rcx
          0.28 ||      ^ jne    68
          3.16 ||        cmp    -0x18(%rax),%dx
          0.00 |+------^ jne    68
          4.92 |         cmp    0x4(%rcx),%r13d
          0.00 |       v jne    68
          1.15 |         test   %rcx,%rcx
          0.00 |       v je     130
      Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-5gairf6or7dazlx3ocxwvftm@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a3f895be
  5. 21 Apr, 2012 23 commits
  6. 20 Apr, 2012 6 commits