aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-05-07perf annotate browser: Do raw printing in 'o'ffset in a single placeArnaldo Carvalho de Melo1-5/+1
Instead of doing the same in all ins scnprintf methods. 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-8mfairi2n1nentoa852alazv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-05-03perf annotate browser: Don't change the asm line color when toggling sourceArnaldo Carvalho de Melo1-3/+0
Gets confusing. Remains to be chosen an appropriate different color for source code. This effectively reverts 58e817d997d1 ("perf annotate: Print asm code as blue when source code is displayed") Requested-by: Peter Zijlstra <peterz@infradead.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-qy9iq32nj3uqe5dbiuq9e3j9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-05-03perf annotate browser: More clearly separate columnsArnaldo Carvalho de Melo3-28/+36
The first column (columns in the near future) are for the per line event overhead(s), that only appear when they are not zero. To clearly separate it, add back a solid vertical line, with just one colour, not influenced by the per line overheads. Then have the addr/offset column, then optionally the dynamic (static in the future) jump->target arrows, if 'j' enables it. Then the instructions. Requested-by: Peter Zijlstra <peterz@infradead.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-r415t4sps0oyr9y8kd9j7clz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-05-03perf ui browser: Introduce routine to draw vertical lineArnaldo Carvalho de Melo2-0/+11
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-umb4jlu0ee8r2rc3x4jkahgk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-27perf annotate browser: Don't display 0.00 percentagesArnaldo Carvalho de Melo1-7/+7
Cleaning up more the output. 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-81pimnsnaa9y2j0a9plstu1c@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-27perf annotate browser: Remove the vertical line after the percentagesArnaldo Carvalho de Melo1-5/+4
It is confusing when used with jump -> target lines. Requested-by: Linus 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-xeiyfsxptwtmlvowledg6wpy@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-27perf annotate browser: Show current jump, back or forwardArnaldo Carvalho de Melo1-27/+23
Instead of trying to show the current loop by naively looking for the next backward jump, just use 'j' to toggle showing arrows connecting jump with its target. And do it for forward jumps as well. Loop detection requires more code to follow the flow control, etc. Reported-by: Linus 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-soahcn1lz2u4wxj31ch0594j@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-27perf ui browser: Add method to draw up/down arrow lineArnaldo Carvalho de Melo2-4/+54
It figures out the direction and draws downwards arrows too if that is the case. 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-tg329nr7q4dg9d0tl3o0wywg@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-27perf annotate browser: Add a right arrow before call instructionsArnaldo Carvalho de Melo1-0/+3
The counterpart of 'ret' instructions. Suggested-by: Linus 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-jlz2ldaquaow0rqi2vr4b91l@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-25perf annotate browser: Don't draw jump connectors for out of function jumpsArnaldo Carvalho de Melo1-2/+4
As described in the previous patch. Next step is to properly label those jumps by using a -> arrow, i.e. not backwards/forwards, and allow the user to navigate to this other function when enter or -> is pressed. 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-ax2sss463eu88wgl9ee8a6b6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-25perf annotate: Disambiguage offsets and addresses in operandsArnaldo Carvalho de Melo1-7/+7
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.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-25perf annotate browser: Handle NULL jump targetsArnaldo Carvalho de Melo1-0/+7
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: Hagen Paul Pfeifer <hagen@jauu.net> Reported-by: Ingo 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.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-24perf annotate browser: Initial loop detectionArnaldo Carvalho de Melo3-4/+98
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: Linus 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.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-20ui browser: Add method to write graphical charactersArnaldo Carvalho de Melo3-10/+12
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.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-20perf annotate browser: Handle retq instructionsArnaldo Carvalho de Melo1-4/+9
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.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-20perf annotate browser: Add visual cue for retq instructionArnaldo Carvalho de Melo1-4/+13
Just use a left arrow prefixing retqs. Requested-by: Linus 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.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-20perf annotate browser: Add visual cues on jump linesArnaldo Carvalho de Melo1-1/+12
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: Linus 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.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-20perf annotate browser: Bandaid offsets/jump label objdump ambiguityArnaldo Carvalho de Melo1-1/+9
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.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-20perf annotate: Group operands membersArnaldo Carvalho de Melo1-9/+8
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.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-19perf annotate browser: Use a vertical line as percentage separatorArnaldo Carvalho de Melo1-2/+4
Where we had ':'. 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-l8gbejzpglnwiwk43450h31g@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-19perf annotate browser: Make lines more compactArnaldo Carvalho de Melo1-8/+9
But now we have a lot of space on the right... Perhaps we should add a "Trending on G+" gizmo... ;-) Requested-by: Linus 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-igoynvtg2wc6mdfinc69prp6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-19perf annotate browser: Align jump labelsArnaldo Carvalho de Melo1-4/+13
Find out at browser startup the max width and use it when rendering jump labels on the screen. 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-7dxjiwqb77wz6f5lc05e0i0x@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-19perf annotate browser: Hide non jump target addresses in offset modeArnaldo Carvalho de Melo1-13/+58
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: Linus 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.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-19perf annotate browser: Rename disasm_line_rb_nodeArnaldo Carvalho de Melo1-38/+38
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.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-19perf annotate: Introduce scnprintf ins_ops methodArnaldo Carvalho de Melo1-2/+11
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: Linus 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.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-18perf annotate: Parse call targets earlierArnaldo Carvalho de Melo1-5/+5
No need to do it everytime the user presses enter/-> on a call instruction. 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-ybgss44m5ycry8mk7b1qdbre@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-18perf annotate: Disassembler instruction parsingArnaldo Carvalho de Melo1-16/+3
So that at disassembly time we parse targets, etc. Supporting jump instructions initially, call functions are next. 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-7vzlh66n5or46n27ji658cnl@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-16perf annotate browser: Use the disasm_line instruction name and operand fieldsArnaldo Carvalho de Melo1-19/+10
No need to reparse it everytime. 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-90ncot487p4h5rzkn8h2whou@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-16perf annotate: Rename objdump_line to disasm_lineArnaldo Carvalho de Melo1-91/+88
We want to move away from using 'objdump -dS' as the only disassembler supported. 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-lsn9pjuxxm5ezsubyhkmprw7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-11perf tools: Move GTK+ bits to tools/perf/ui/gtk directoryNamhyung Kim2-0/+197
Move those files to new directory in order to be prepared to further UI work. Makefile and header file pathes are adjusted accordingly. Also fix a build breakage if NO_GTK2=1 is given. Signed-off-by: Namhyung Kim <namhyung.kim@lge.com> Suggested-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Acked-by: Pekka Enberg <penberg@kernel.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Pekka Enberg <penberg@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl Link: http://lkml.kernel.org/r/1333523765-12092-1-git-send-email-namhyung.kim@lge.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-11perf tools: Move UI bits to tools/perf/ui directoryNamhyung Kim16-0/+3472
Move those files to new directory in order to be prepared to further UI work. Makefile and header file pathes are adjusted accordingly. Signed-off-by: Namhyung Kim <namhyung.kim@lge.com> Suggested-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Acked-by: Pekka Enberg <penberg@kernel.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Pekka Enberg <penberg@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl Link: http://lkml.kernel.org/r/1333523666-12057-1-git-send-email-namhyung.kim@lge.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>