Messages in this thread | | | Subject | Re: mailing list for trace users | From | Mike Galbraith <> | Date | Tue, 22 Sep 2009 13:18:54 +0200 |
| |
On Tue, 2009-09-22 at 12:13 +0300, Avi Kivity wrote: > Yes please. Here's a question to start it off - how to I 'perf > annotate' a symbol in a module? > > $ perf report > # Samples: 68202 > # > # Overhead Command Shared Object Symbol > # ........ ............... ............. ...... > # > 84.17% qemu-system-x86 [kernel] [k] vmx_vcpu_run [kvm_intel] > 4.28% qemu-system-x86 [kernel] [k] kvm_arch_vcpu_ioctl_run > [kvm] > 0.88% qemu-system-x86 [kernel] [k] add_preempt_count > 0.75% qemu-system-x86 [kernel] [k] _spin_unlock_irqrestore > 0.68% qemu-system-x86 [kernel] [k] _spin_lock_irq > > $ perf annotate -k ~avi/kvm/linux-2.6/vmlinux -m vmx_vcpu_run > Error: symbol 'vmx_vcpu_run' not present amongst the samples. > > builtin symbols work. >
Hm, dunno. Using tip v2.6.31-7960-gf3da2f6, module annotation seems to work fine here.
marge:/root/tmp # perf report -k vmlinux -m -d [kernel]|grep ahci_interrupt 1.21% swapper [k] ahci_interrupt [ahci] 0.11% :7222 [k] ahci_interrupt [ahci] 0.04% :4876 [k] ahci_interrupt [ahci] 0.02% :6628 [k] ahci_interrupt [ahci] 0.01% :7452 [k] ahci_interrupt [ahci] 0.01% :7407 [k] ahci_interrupt [ahci] marge:/root/tmp # perf annotate -k vmlinux -m ahci_interrupt|grep -C 20 Disassembly
------------------------------------------------ Percent | Source code & Disassembly of ahci.ko ------------------------------------------------ : : : : Disassembly of section .text: : : 0000000000002a49 <ahci_interrupt>: : ata_port_freeze(ap); : } : } : : static irqreturn_t ahci_interrupt(int irq, void *dev_instance) : { 0.00 : 2a49: 55 push %rbp 0.69 : 2a4a: 48 89 e5 mov %rsp,%rbp 0.00 : 2a4d: 41 57 push %r15 0.00 : 2a4f: 49 89 f7 mov %rsi,%r15 0.00 : 2a52: 41 56 push %r14 0.00 : 2a54: 41 55 push %r13 0.00 : 2a56: 41 54 push %r12 0.00 : 2a58: 53 push %rbx 0.00 : 2a59: 48 83 ec 58 sub $0x58,%rsp : { asm volatile("mov" size " %0,%1": :reg (val), \ : "m" (*(volatile type __force *)addr) barrier); } : marge:/root/tmp #
| |