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

[Xen-changelog] minor tweak



ChangeSet 1.1240, 2005/03/01 13:47:27+00:00, 
rneugeba@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

        minor tweak
        
        Signed-off-by: michael.fetterman@xxxxxxxxxxxx



 mm.c                 |   20 ++++++++------------
 x86_32/asm-offsets.c |    7 +++++--
 2 files changed, 13 insertions(+), 14 deletions(-)


diff -Nru a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c 2005-04-05 12:06:04 -04:00
+++ b/xen/arch/x86/mm.c 2005-04-05 12:06:04 -04:00
@@ -1689,10 +1689,8 @@
     perfc_incrc(calls_to_mmu_update); 
     perfc_addc(num_page_updates, count);
     /*
-     * do a histogram for count. 
-     * first bucket is for count=0,
-     * second bucket is for count=1
-     * last bucket is for count >= 63 *  PERFC_PT_UPDATES_BUCKET_SIZE
+     * histogram: special treatment for 0 and 1 count. After that equally
+     * spaced with last bucket taking the rest.
      */
     if ( count == 0 )
     {
@@ -1700,10 +1698,10 @@
     } else if ( count == 1 )
     {
         perfc_incra(bpt_updates, 1);
-    } else if ( (count / PERFC_PT_UPDATES_BUCKET_SIZE)
+    } else if ( ((count-2) / PERFC_PT_UPDATES_BUCKET_SIZE)
                 < (PERFC_MAX_PT_UPDATES - 3) )
     {
-        perfc_incra(bpt_updates, (count / PERFC_PT_UPDATES_BUCKET_SIZE) + 2);
+        perfc_incra(bpt_updates, ((count-2)/PERFC_PT_UPDATES_BUCKET_SIZE) + 2);
     } else
     {
         perfc_incra(bpt_updates, PERFC_MAX_PT_UPDATES - 1);
@@ -2371,10 +2369,8 @@
 
 #ifdef PERF_COUNTERS
     /*
-     * do a histogram for count. 
-     * first bucket is for count=0,
-     * second bucket is for count=1
-     * last bucket is for count >= 63 *  PERFC_PT_UPDATES_BUCKET_SIZE
+     * histogram: special treatment for 0 and 1 count. After that equally
+     * spaced with last bucket taking the rest.
      */
     if ( count == 0 )
     {
@@ -2382,10 +2378,10 @@
     } else if ( count == 1 ) 
     {
         perfc_incra(wpt_updates, 1);
-    } else if ( (count / PERFC_PT_UPDATES_BUCKET_SIZE)
+    } else if ( ((count-2) / PERFC_PT_UPDATES_BUCKET_SIZE)
                 < (PERFC_MAX_PT_UPDATES - 3) )
     {
-        perfc_incra(wpt_updates, (count / PERFC_PT_UPDATES_BUCKET_SIZE) + 2);
+        perfc_incra(wpt_updates, ((count-2)/PERFC_PT_UPDATES_BUCKET_SIZE) + 2);
     } else
     {
         perfc_incra(wpt_updates, PERFC_MAX_PT_UPDATES - 1);
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:06:04 -04:00
+++ b/xen/arch/x86/x86_32/asm-offsets.c 2005-04-05 12:06:04 -04:00
@@ -5,6 +5,7 @@
  */
 
 #include <xen/sched.h>
+#include <xen/config.h>
 
 #define DEFINE(_sym, _val) \
     __asm__ __volatile__ ( "\n->" #_sym " %0 " #_val : : "i" (_val) )
@@ -69,6 +70,8 @@
 
     DEFINE(FIXMAP_apic_base, fix_to_virt(FIX_APIC_BASE));
 
-    OFFSET(PERFC_hypercalls, struct perfcounter_t, hypercalls);
-    OFFSET(PERFC_exceptions, struct perfcounter_t, exceptions);
+#if PERF_COUNTERS
+    OFFSET(PERFC_hypercalls, struct perfcounter, hypercalls);
+    OFFSET(PERFC_exceptions, struct perfcounter, exceptions);
+#endif
 }

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


 


Rackspace

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