1. 04 5月, 2012 2 次提交
  2. 28 4月, 2012 4 次提交
  3. 26 4月, 2012 1 次提交
  4. 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
  5. 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
  6. 20 4月, 2012 3 次提交
  7. 19 4月, 2012 5 次提交
  8. 16 4月, 2012 2 次提交
  9. 12 4月, 2012 1 次提交
  10. 08 4月, 2012 6 次提交
  11. 05 3月, 2012 4 次提交
  12. 28 11月, 2011 1 次提交
  13. 26 10月, 2011 1 次提交
  14. 21 10月, 2011 1 次提交