WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] added performance counters for hypercalls and exceptions

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] added performance counters for hypercalls and exceptions
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Fri, 25 Feb 2005 17:27:21 +0000
Delivery-date: Tue, 05 Apr 2005 16:05:25 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1238, 2005/02/25 17:27:21+00:00, 
rneugeba@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

        added performance counters for hypercalls and exceptions
        
        Signed-off-by: michael.fetterman@xxxxxxxxxxxx



 arch/x86/x86_32/asm-offsets.c |    3 +++
 arch/x86/x86_32/entry.S       |   10 ++++++++--
 common/perfc.c                |    2 +-
 include/xen/perfc_defn.h      |    2 ++
 4 files changed, 14 insertions(+), 3 deletions(-)


diff -Nru a/xen/arch/x86/x86_32/asm-offsets.c 
b/xen/arch/x86/x86_32/asm-offsets.c
--- a/xen/arch/x86/x86_32/asm-offsets.c 2005-04-05 12:05:30 -04:00
+++ b/xen/arch/x86/x86_32/asm-offsets.c 2005-04-05 12:05:30 -04:00
@@ -68,4 +68,7 @@
     BLANK();
 
     DEFINE(FIXMAP_apic_base, fix_to_virt(FIX_APIC_BASE));
+
+    OFFSET(PERFC_hypercalls, struct perfcounter_t, hypercalls);
+    OFFSET(PERFC_exceptions, struct perfcounter_t, exceptions);
 }
diff -Nru a/xen/arch/x86/x86_32/entry.S b/xen/arch/x86/x86_32/entry.S
--- a/xen/arch/x86/x86_32/entry.S       2005-04-05 12:05:30 -04:00
+++ b/xen/arch/x86/x86_32/entry.S       2005-04-05 12:05:30 -04:00
@@ -60,7 +60,7 @@
 #include <asm/apicdef.h>
 #include <asm/page.h>
 #include <public/xen.h>
-
+        
 #define GET_CURRENT(reg)         \
         movl $STACK_SIZE-4, reg; \
         orl  %esp, reg;          \
@@ -278,8 +278,11 @@
         subl $4,%esp
        SAVE_ALL(b)
         sti
+#ifdef PERF_COUNTERS
+        lock incl SYMBOL_NAME(perfcounters)+PERFC_hypercalls(,%eax,4)
+#endif
         GET_CURRENT(%ebx)
-       andl $(NR_hypercalls-1),%eax
+        andl $(NR_hypercalls-1),%eax
        call *SYMBOL_NAME(hypercall_table)(,%eax,4)
         movl %eax,XREGS_eax(%esp)       # save the return value
 
@@ -466,6 +469,9 @@
         movw  XREGS_entry_vector(%esp),%ax
         movl  %esp,%edx
        pushl %edx                      # push the xen_regs pointer
+#ifdef PERF_COUNTERS
+        lock incl SYMBOL_NAME(perfcounters)+PERFC_exceptions(,%eax,4)
+#endif        
        GET_CURRENT(%ebx)
        call  *SYMBOL_NAME(exception_table)(,%eax,4)
         addl  $4,%esp
diff -Nru a/xen/common/perfc.c b/xen/common/perfc.c
--- a/xen/common/perfc.c        2005-04-05 12:05:30 -04:00
+++ b/xen/common/perfc.c        2005-04-05 12:05:30 -04:00
@@ -66,7 +66,7 @@
         case TYPE_S_ARRAY:
             for ( j = sum = 0; j < perfc_info[i].nr_elements; j++ )
                 sum += atomic_read(&counters[j]);
-            printk("TOTAL[%10d]\n ", sum);
+            printk("TOTAL[%10d]  ", sum);
             for ( j = 0; j < perfc_info[i].nr_elements; j++ )
             {
                 printk("A%02d[%10d]  ", j, atomic_read(&counters[j]));
diff -Nru a/xen/include/xen/perfc_defn.h b/xen/include/xen/perfc_defn.h
--- a/xen/include/xen/perfc_defn.h      2005-04-05 12:05:30 -04:00
+++ b/xen/include/xen/perfc_defn.h      2005-04-05 12:05:30 -04:00
@@ -41,6 +41,8 @@
 PERFCOUNTER_ARRAY( wpt_updates, "writable pt updates", PERFC_MAX_PT_UPDATES )
 PERFCOUNTER_ARRAY( bpt_updates, "batched pt updates", PERFC_MAX_PT_UPDATES )
 
+PERFCOUNTER_ARRAY( hypercalls, "hypercalls", NR_hypercalls )
+PERFCOUNTER_ARRAY( exceptions, "exceptions", 32 ) /* XXX constant */
 
 #define VMX_PERF_EXIT_REASON_SIZE 37
 #define VMX_PERF_VECTOR_SIZE 0x20

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] added performance counters for hypercalls and exceptions, BitKeeper Bot <=