1. 30 5月, 2012 4 次提交
  2. 29 5月, 2012 1 次提交
  3. 13 5月, 2012 3 次提交
  4. 11 5月, 2012 1 次提交
  5. 09 5月, 2012 1 次提交
  6. 08 5月, 2012 1 次提交
  7. 04 5月, 2012 3 次提交
  8. 03 5月, 2012 5 次提交
  9. 28 4月, 2012 5 次提交
  10. 26 4月, 2012 1 次提交
  11. 25 4月, 2012 3 次提交
    • A
      perf annotate: Disambiguage offsets and addresses in operands · 44d1a3ed
      Arnaldo Carvalho de Melo 提交于
      We were using ins_ops->target for callq addresses and jump offsets,
      disambiguate by having ins_ops->target.addr and ins_ops->target.offset.
      
      For jumps we'll need both to fixup lines that don't have an offset on
      the <> part.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      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-3nlcmstua75u07ao7wja1rwx@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      44d1a3ed
    • A
      perf annotate browser: Handle NULL jump targets · 9481ede9
      Arnaldo Carvalho de Melo 提交于
      In annotate_browser__mark_jump_targets
      
      702                     dlt = browser->offsets[dl->ops.target];
      703                     bdlt = disasm_line__browser(dlt);
      704                     bdlt->jump_target = true;
      705             }
      706
      707     }
      
      (gdb) p size
      $5 = 2415
      (gdb) p offset
      $6 = 140
      (gdb) p dl->ops.target
      $7 = 143
      (gdb) p browser->offsets[143]
      $8 = (struct disasm_line *) 0x0
      (gdb) p dl->name
      $9 = 0x2363bd0 "je"
      (gdb)
      
      Really strange, the code assumed that at the jump target we would have
      an assembly line, but only in the previous instruction offset we have a
      'lock':
      
      (gdb) p browser->offsets[144]
      $10 = (struct disasm_line *) 0x0
      (gdb) p browser->offsets[142]
      $11 = (struct disasm_line *) 0x27bd620
      (gdb) p browser->offsets[142]->name
      $12 = 0x237a8a0 "lock"
      (gdb)
      
      I'll study this more, but for now I'll just check if there is a
      disasm_line at dl->ops.target, i.e. a valid jump target.
      Reported-by: NHagen Paul Pfeifer <hagen@jauu.net>
      Reported-by: NIngo Molnar <mingo@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      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-inzjrzyqhkzyv78met2vula6@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9481ede9
    • A
      perf annotate browser: Initial loop detection · a3f895be
      Arnaldo Carvalho de Melo 提交于
      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: NLinus 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: NArnaldo Carvalho de Melo <acme@redhat.com>
      a3f895be
  12. 21 4月, 2012 6 次提交
    • A
      ui browser: Add method to write graphical characters · 59d038d5
      Arnaldo Carvalho de Melo 提交于
      To save typing on the switch char set slang stuff.
      
      It also helps in removing more slang direct calls, wrapping them at the
      ui_browser level, where at some point I'll try to implement those in
      terms of GTK+.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      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-63yhb2htv9g3g1olmojzptkd@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      59d038d5
    • A
      perf annotate browser: Handle retq instructions · c4cceae3
      Arnaldo Carvalho de Melo 提交于
      By just returning to the previous function being annotated or to the top
      main screen when popping out the base of the annotation stack.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      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-x1dlc4d5aukj72g45o15s75k@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c4cceae3
    • A
      perf annotate browser: Add visual cue for retq instruction · 4ea08b52
      Arnaldo Carvalho de Melo 提交于
      Just use a left arrow prefixing retqs.
      Requested-by: NLinus 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-tnpfijuomrntbnl5vr6ibdwa@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4ea08b52
    • A
      perf annotate browser: Add visual cues on jump lines · 51a0d455
      Arnaldo Carvalho de Melo 提交于
      Using up/down arrows just before the instruction, replacing the actual chars
      with approximations to avoid mail encoding snafus:
      
      avtab_search_node
          0.00 |      push   %rbp
          0.00 |      mov    %rsp,%rbp
          0.00 |      callq  mcount
          0.00 |      movzwl 0x6(%rsi),%edx
          0.00 |      and    $0x7fff,%dx
          0.00 |      test   %rdi,%rdi
          0.00 |    v jne    20
          0.00 | 17:  xor    %eax,%eax
          0.00 | 19:  leaveq
          0.00 |      retq
          0.00 |      nopl   0x0(%rax,%rax,1)
          0.00 | 20:  mov    (%rdi),%rax
          0.00 |      test   %rax,%rax
          0.00 |    ^ je     17
          0.00 |      movzwl (%rsi),%ecx
          0.00 |      movzwl 0x2(%rsi),%r9d
          0.00 |      movzwl 0x4(%rsi),%r8d
          0.00 |      movzwl %cx,%esi
          0.00 |      movzwl %r9w,%r10d
          0.00 |      shl    $0x9,%esi
          0.00 |      lea    (%rsi,%r10,4),%esi
          0.00 |      lea    (%r8,%rsi,1),%esi
          0.00 |      and    0x10(%rdi),%si
          0.00 |      movzwl %si,%esi
          0.00 |      mov    (%rax,%rsi,8),%rax
          0.00 |      test   %rax,%rax
          0.00 |    ^ je     19
          0.00 |      nopw   0x0(%rax,%rax,1)
          0.00 | 60:  cmp    %cx,(%rax)
          0.00 |    v jne    7e
          0.00 |      cmp    %r9w,0x2(%rax)
          0.00 |    v jne    7e
          0.00 |      cmp    %r8w,0x4(%rax)
          0.00 |    v jne    79
          0.00 |      test   %dx,0x6(%rax)
          0.00 |    ^ jne    19
          0.00 | 79:  cmp    %r8w,0x4(%rax)
         93.04 | 7e:^ ja     17
          2.53 |      mov    0x10(%rax),%rax
          4.43 |      test   %rax,%rax
          0.00 |    ^ jne    60
          0.00 |      leaveq
          0.00 |      retq
      
      Next low hanging fruit is to use left arrow for retqs, then work on clearling
      marking loops.
      Requested-by: NLinus 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-hkx848wdbs6n7bcp3ymr9yus@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      51a0d455
    • A
      perf annotate browser: Bandaid offsets/jump label objdump ambiguity · 97148a97
      Arnaldo Carvalho de Melo 提交于
      We need to cope with things like:
      
      $ objdump  -d --no-show-raw -S -C /lib/modules/3.4.0-rc2+/build/vmlinux
      <SNIP>
      ffffffff8125ec60 <copy_user_generic_unrolled>:
       * Output:
       * eax uncopied bytes or 0 if successful.
       */
      ENTRY(copy_user_generic_unrolled)
      	CFI_STARTPROC
      	cmpl $8,%edx
      ffffffff8125ec60:	cmp    $0x8,%edx
      	jb 20f		/* less then 8 bytes, go to byte copy loop */
      ffffffff8125ec63:	jb     ffffffff8125ecf5 <copy_user_generic_unrolled+0x95>
      	ALIGN_DESTINATION
      <SNIP>
      ffffffff8125ec8d:	je     ffffffff8125ecd9 <copy_user_generic_unrolled+0x79>
      1:	movq (%rsi),%r8
      ffffffff8125ec8f:	mov    (%rsi),%r8
      2:	movq 1*8(%rsi),%r9
      ffffffff8125ec92:	mov    0x8(%rsi),%r9
      3:	movq 2*8(%rsi),%r10
      ffffffff8125ec96:	mov    0x10(%rsi),%r10
      4:	movq 3*8(%rsi),%r11
      
      <SNIP>
      
      Probably expect that the length of the addr field be the same...
      
      Lazy move for now, back to supporting suppressing the address on callq lines...
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      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-7hp85vnvowpqj8799f8rxbu1@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      97148a97
    • A
      perf annotate: Group operands members · c7e6ead7
      Arnaldo Carvalho de Melo 提交于
      So that the ins_ops can handle them in a single place, instead of adding
      more and more functions or ins_ops parameters.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      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-pk4dqaum6ftiz104dvimwgtb@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c7e6ead7
  13. 20 4月, 2012 3 次提交
  14. 19 4月, 2012 3 次提交
    • A
      perf annotate browser: Hide non jump target addresses in offset mode · b793a401
      Arnaldo Carvalho de Melo 提交于
      This:
      
          0.00 :         ffffffff8116bd00:       lock btsl $0x0,(%r12)
        100.00 :         ffffffff8116bd07:       sbb    %eax,%eax
          0.00 :         ffffffff8116bd09:       test   %eax,%eax
          0.00 :         ffffffff8116bd0b:       jne    ffffffff8116bf5f <__mem_cgroup_commit_charge+0x28f>
          0.00 :         ffffffff8116bd11:       mov    (%r12),%rax
          0.00 :         ffffffff8116bd15:       test   $0x2,%al
          0.00 :         ffffffff8116bd17:       jne    ffffffff8116bf6e <__mem_cgroup_commit_charge+0x29e>
          0.00 :         ffffffff8116bd1d:       test   %r9b,%r9b
          0.00 :         ffffffff8116bd20:       jne    ffffffff8116be30 <__mem_cgroup_commit_charge+0x160>
          0.00 :         ffffffff8116bd26:       xor    %eax,%eax
          0.00 :         ffffffff8116bd28:       mov    %r13,0x8(%r12)
          0.00 :         ffffffff8116bd2d:       lock orb $0x2,(%r12)
          0.00 :         ffffffff8116bd33:       test   %r9b,%r9b
          0.00 :         ffffffff8116bd36:       je     ffffffff8116bdf3 <__mem_cgroup_commit_charge+0x123>
      
      Becomes:
      
          0.00 :         30:       lock btsl $0x0,(%r12)
        100.00 :                   sbb    %eax,%eax
          0.00 :                   test   %eax,%eax
          0.00 :                   jne    28f
          0.00 :                   mov    (%r12),%rax
          0.00 :                   test   $0x2,%al
          0.00 :                   jne    29e
          0.00 :                   test   %r9b,%r9b
          0.00 :                   jne    160
          0.00 :         56:       xor    %eax,%eax
          0.00 :         58:       mov    %r13,0x8(%r12)
          0.00 :                   lock orb $0x2,(%r12)
          0.00 :                   test   %r9b,%r9b
          0.00 :                   je     123
      
      I.e. We trow away all those useless addresses and keep just jump labels.
      Suggested-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      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-r2vmbtgz0l8coluj8flztgrn@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b793a401
    • A
      perf annotate browser: Rename disasm_line_rb_node · 887c0066
      Arnaldo Carvalho de Melo 提交于
      Its not just an rb_node, it carries extra state that is private to the
      browser. And will carry some more in the next patches.
      
      Better name it browser_disasm_line, i.e. something derived from
      disasm_line, that specializes it.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      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-nev4b97vdvv35we1qmooym52@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      887c0066
    • A
      perf annotate: Introduce scnprintf ins_ops method · 28548d78
      Arnaldo Carvalho de Melo 提交于
      And implement the jump one, where if the operands string is not passed,
      a compact form that uses just the target address is used.
      
      Right now this is toggled via the 'o' option in the annotate browser,
      switching from:
      
          0.00 :         ffffffff811661e8:       je     ffffffff81166204 <mem_cgroup_count_vm_event+0x44>
          0.00 :         ffffffff811661ea:       cmp    $0xb,%esi
          0.00 :         ffffffff811661ed:       je     ffffffff811661f8 <mem_cgroup_count_vm_event+0x38>
      
      To:
      
          0.00 :         28:       je     44
          0.00 :         2a:       cmp    $0xb,%esi
          0.00 :         2d:       je     38
      Suggested-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      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-o88q46yh4kxgpd1chk5gvjl5@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      28548d78