[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] RE: oprofile 0.9.3 xen symbols incorrect



Padma,
 
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.
 
Thanks
 
Renato
 
 
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;
             break;
         case TRAP_machine_check:
             HVMTRACE_0D(MCE, v);
 


From: Apparao, Padmashree K [mailto:padmashree.k.apparao@xxxxxxxxx]
Sent: Thursday, March 06, 2008 3:21 PM
To: oprofile-list@xxxxxxxxxxxxxxxxxxxxx; Santos, Jose Renato G; xen-users@xxxxxxxxxxxxxxxxxxx
Subject: FW: oprofile 0.9.3 xen symbols incorrect

 

Hi

 

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)

 

Thanks

-Padma

 

 

 

 

 

 

 

Attachment: xenoprof_fix_intel_hvm.patch
Description: xenoprof_fix_intel_hvm.patch

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.