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] minor tweak

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] minor tweak
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Tue, 01 Mar 2005 13:47:27 +0000
Delivery-date: Tue, 05 Apr 2005 16:05:58 +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.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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] minor tweak, BitKeeper Bot <=