You will have to debug this some more and provide more details.
I suggest that you remove the patch and do some more tests on the original system.
Try generating a more detailed opreport including the EIP values in addition to the symbols, and then check what symbol the suspicious EIP corresponds to in the xen image.
Unfortunately I will not have much time to test this myself
Good luck

From: Apparao, Padmashree K []
Sent: Thursday, March 06, 2008 10:05 PM
To: Santos, Jose Renato G;;
Subject: RE: oprofile 0.9.3 xen symbols incorrect



OOPs that patch kills the VM that is running L






From: Santos, Jose Renato G []
Sent: Thursday, March 06, 2008 9:22 PM
To: Apparao, Padmashree K;;
Subject: RE: oprofile 0.9.3 xen symbols incorrect




I received some reports in the past that Xenoprof was generating incorrect symbols for HVM guests on Intel processors.

Here is a patch provided by Andrew Gallagher that should fix the problem but I did not have had a chance to test it yet. It has been sitting on my todo list for a long time.

Could you please check if this fix the problem and let me know.







diff -r 0164d924ceba xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c Wed Feb 13 10:43:13 2008 +0000
+++ b/xen/arch/x86/hvm/vmx/vmx.c Thu Mar 06 21:08:46 2008 -0800
@@ -2511,6 +2511,7 @@ asmlinkage void vmx_vmexit_handler(struc
          * (2) NMI
         unsigned int intr_info, vector;
+        int saved_eip;
         intr_info = __vmread(VM_EXIT_INTR_INFO);
         BUG_ON(!(intr_info & INTR_INFO_VALID_MASK));
@@ -2565,7 +2566,10 @@ asmlinkage void vmx_vmexit_handler(struc
                  (X86_EVENTTYPE_NMI << 8) )
                 goto exit_and_crash;
             HVMTRACE_0D(NMI, v);
+            saved_eip = regs->eip;
+            regs->eip = __vmread(GUEST_RIP);
             do_nmi(regs); /* Real NMI, vector 2: normal processing. */
+            regs->eip = saved_eip;
         case TRAP_machine_check:
             HVMTRACE_0D(MCE, v);



From: Apparao, Padmashree K []
Sent: Thursday, March 06, 2008 3:21 PM
To:; Santos, Jose Renato G;
Subject: FW: oprofile 0.9.3 xen symbols incorrect




I am using oprofile 0.9.3 on xen cs 16540 on an Intel system.


When I look at the top “hot” functions, I see p2m_change_type being one of the top function in xen-syms. This function is only in the svm (AMD) code and should not appear on an Intel system. I see that this function is not being clled at all when I am running my apps as I have put printk in the functions and they do not show up anywhere in the dmesg.


Is it possible that oprofile is picking up the symbols from elsewhere? The /root/.profile/daemonrc file shows the correct xen-syms file, so obviously it is not using that..


(I am profiling a HVM domain using passive-domains in the command line for opcontrol)