From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757573AbdJMKVs (ORCPT ); Fri, 13 Oct 2017 06:21:48 -0400 Received: from mga05.intel.com ([192.55.52.43]:9051 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753276AbdJMKVr (ORCPT ); Fri, 13 Oct 2017 06:21:47 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,370,1503385200"; d="asc'?scan'208";a="160094653" Date: Fri, 13 Oct 2017 18:15:00 +0800 From: "Du, Changbin" To: "Du, Changbin" Cc: Arnaldo Carvalho de Melo , peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org, jolsa@kernel.org Subject: Re: Does perf-annotate work correctly? Message-ID: <20171013101500.GA29995@intel.com> References: <20170912101035.GA21638@intel.com> <20170912143350.GA3452@kernel.org> <20170913091408.GA9625@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mYCpIKhGyMATD0i+" Content-Disposition: inline In-Reply-To: <20170913091408.GA9625@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --mYCpIKhGyMATD0i+ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Jiri, Sorry, missed you (but get_maintainer.pl doesn't list you). Here is ealier = email. https://lkml.org/lkml/2017/9/12/158 Do you think if this is a real issue? btw, is their a dedicated mailist for perf? Thanks. On Wed, Sep 13, 2017 at 05:14:09PM +0800, Du, Changbin wrote: >=20 > Here is another example which may be easy to analyse. I beleve that somet= hing wrong > in parsing objdump output. >=20 > The 'test %esi,%esi' is not of 'if (unlikely(error))', but 'if (!idtv_i= nfo_valid)'. >=20 >=20 > perf annotate of function vmx_complete_interrupts(): > vmx_complete_interrupts /lib/modules/4.13.0+/kernel/arch/x86/kvm/kvm-int= el.ko > Percent=E2=94=82 mov 0x4590(%rdi),%esi = =E2=96=92 > =E2=94=82 vmx_cancel_injection(): = =E2=96=92 > =E2=94=82 vmcs_read32(VM_ENTR= Y_INTR_INFO_FIELD), =E2=96=92 > =E2=94=82 VM_ENTRY_INSTRUCTIO= N_LEN, =E2=96=92 > =E2=94=82 VM_ENTRY_EXCEPTION_= ERROR_CODE); =E2=96=92 > =E2=94=82 = =E2=96=92 > =E2=94=82 vmcs_write32(VM_ENTRY_INTR_INFO_FIELD, 0); = =E2=96=92 > =E2=94=82 } = =E2=96=92 > =E2=94=82 movb $0x0,0x32c8(%rdi) = =E2=96=92 > =E2=94=82 __vmx_complete_interrupts(): = =E2=96=92 > =E2=94=82 movb $0x0,0x1a7c(%rdi) = =E2=96=92 > =E2=94=82 movb $0x0,0x1a88(%rdi) = =E2=96=92 > =E2=94=82 __vmcs_writel(): = =E2=96=92 > =E2=94=82 u8 error; = =E2=96=92 > =E2=94=82 = =E2=96=92 > =E2=94=82 asm volatile (__ex(ASM_VMX_VMWRITE_RAX_RDX) "= ; setna %0" =E2=96=92 > =E2=94=82 : "=3Dq"(error) : "a"(value), = "d"(field) : "cc"); =E2=96=92 > =E2=94=82 if (unlikely(error)) = =E2=96=92 > =E2=94=82 vmwrite_error(field, value); = =E2=96=92 > 0.02 =E2=94=82 test %esi,%esi = =E2=96=92 > =E2=94=82 =E2=86=93 js 25 = =E2=96=92 > 99.98 =E2=94=82 =E2=86=90 retq = =E2=96=92 > =E2=94=8225: push %rbp = =E2=96=92 > =E2=94=82 mov $0x440a,%ecx = =E2=96=92 > =E2=94=82 mov $0x440c,%edx = =E2=96=92 > =E2=94=82 vmx_complete_interrupts(): = =E2=97=86 > =E2=94=82 break; = =E2=96=92 > =E2=94=82 } = =E2=96=92 > =E2=94=82 } = =E2=96=92 > =E2=94=82 = =E2=96=92 > =E2=94=82 static void vmx_complete_interrupts(struct vcpu_vmx *= vmx) =E2=96=92 > =E2=94=82 { = =E2=96=92 > =E2=94=82 mov %rsp,%rbp = =E2=96=92 > =E2=94=82 =E2=86=92 callq __vmx_complete_interrupts.part.64 = =E2=96=92 > =E2=94=82 __vmx_complete_interrupts(&vmx->vcpu, vmx->id= t_vectoring_info, =E2=96=92 > =E2=94=82 pop %rbp = =E2=96=92 > =E2=94=82 =E2=86=90 retq = =E2=96=92 >=20 >=20 >=20 >=20 > GDB disassable: > (gdb) disassemble /s vmx_complete_interrupts > Dump of assembler code for function vmx_complete_interrupts: > arch/x86/kvm/vmx.c: > 8917 { > 0x0000000000007110 <+0>: callq 0x7115 >=20 > 8918 __vmx_complete_interrupts(&vmx->vcpu, vmx->idt_vectoring_= info, > 0x0000000000007115 <+5>: mov 0x4590(%rdi),%esi >=20 > 8873 vcpu->arch.nmi_injected =3D false; > 0x000000000000711b <+11>: movb $0x0,0x32c8(%rdi) >=20 > arch/x86/kvm/x86.h: > 14 vcpu->arch.exception.pending =3D false; > 0x0000000000007122 <+18>: movb $0x0,0x1a7c(%rdi) >=20 > 15 } > 16 > 17 static inline void kvm_queue_interrupt(struct kvm_vcpu *vcpu, u8 = vector, > 18 bool soft) > 19 { > 20 vcpu->arch.interrupt.pending =3D true; > 21 vcpu->arch.interrupt.soft =3D soft; > 22 vcpu->arch.interrupt.nr =3D vector; > 23 } > 24 > 25 static inline void kvm_clear_interrupt_queue(struct kvm_vcpu *vcp= u) > 26 { > 27 vcpu->arch.interrupt.pending =3D false; > 0x0000000000007129 <+25>: movb $0x0,0x1a88(%rdi) >=20 > arch/x86/kvm/vmx.c: > 8877 if (!idtv_info_valid) > 0x0000000000007130 <+32>: test %esi,%esi > 0x0000000000007132 <+34>: js 0x7135 >=20 > 8919 VM_EXIT_INSTRUCTION_LEN, > 8920 IDT_VECTORING_ERROR_CODE); > 8921 } > 0x0000000000007134 <+36>: retq >=20 > 8917 { > 0x0000000000007135 <+37>: push %rbp > 0x0000000000007136 <+38>: mov $0x440a,%ecx > 0x000000000000713b <+43>: mov $0x440c,%edx > ---Type to continue, or q to quit--- > 0x0000000000007140 <+48>: mov %rsp,%rbp > 0x0000000000007143 <+51>: callq 0x7000 <__vmx_complete_interrupts> >=20 > 8919 VM_EXIT_INSTRUCTION_LEN, > 8920 IDT_VECTORING_ERROR_CODE); > 8921 } >=20 --=20 Thanks, Changbin Du --mYCpIKhGyMATD0i+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJZ4JIkAAoJEAanuZwLnPNUpPAH/3djrhrSDfcj31xL8vOYr1/G Rec7Z8R6+4bPB7I+KGUzB1toQC8jaCI1AaWxxCmCbNeswuYhjUOxzfdOx22deF9/ gXdwK0ZZFJdbQDjfwBW/B63OoXVtMu05enOP2gR3DK1nnh6fvDVJDjrbooktSqJO rPaEdvXumbeF2p8Y/VuQkJMuKW+Ad8ZcI8pDGEP2OxtHQ6nESYgiO+aBgY2gNJz7 +GMLTp0GT0ASfx6yKeZeQUAlFwE8gh0nLM/BtJ18hNTDfYVXSXOeWNpiWCQ7qsFZ rjmAtvM4D0BI5XGh8q/BDHOpIAr3QkEZCkj4t48uPVqyCRMEbSu8N5DNRo8cmIs= =MZIs -----END PGP SIGNATURE----- --mYCpIKhGyMATD0i+--