ia64/xen-unstable

changeset 3954:3a2834dc4f1b

bitkeeper revision 1.1240 (4224726fJ1qampcdzMTCSrPkcOif_w)

minor tweak

Signed-off-by: michael.fetterman@cl.cam.ac.uk
author rneugeba@wyvis.research.intel-research.net
date Tue Mar 01 13:47:27 2005 +0000 (2005-03-01)
parents a5931595eca4
children a6914c2c15cf
files xen/arch/x86/mm.c xen/arch/x86/x86_32/asm-offsets.c
line diff
     1.1 --- a/xen/arch/x86/mm.c	Fri Feb 25 17:27:55 2005 +0000
     1.2 +++ b/xen/arch/x86/mm.c	Tue Mar 01 13:47:27 2005 +0000
     1.3 @@ -1689,10 +1689,8 @@ int do_mmu_update(
     1.4      perfc_incrc(calls_to_mmu_update); 
     1.5      perfc_addc(num_page_updates, count);
     1.6      /*
     1.7 -     * do a histogram for count. 
     1.8 -     * first bucket is for count=0,
     1.9 -     * second bucket is for count=1
    1.10 -     * last bucket is for count >= 63 *  PERFC_PT_UPDATES_BUCKET_SIZE
    1.11 +     * histogram: special treatment for 0 and 1 count. After that equally
    1.12 +     * spaced with last bucket taking the rest.
    1.13       */
    1.14      if ( count == 0 )
    1.15      {
    1.16 @@ -1700,10 +1698,10 @@ int do_mmu_update(
    1.17      } else if ( count == 1 )
    1.18      {
    1.19          perfc_incra(bpt_updates, 1);
    1.20 -    } else if ( (count / PERFC_PT_UPDATES_BUCKET_SIZE)
    1.21 +    } else if ( ((count-2) / PERFC_PT_UPDATES_BUCKET_SIZE)
    1.22                  < (PERFC_MAX_PT_UPDATES - 3) )
    1.23      {
    1.24 -        perfc_incra(bpt_updates, (count / PERFC_PT_UPDATES_BUCKET_SIZE) + 2);
    1.25 +        perfc_incra(bpt_updates, ((count-2)/PERFC_PT_UPDATES_BUCKET_SIZE) + 2);
    1.26      } else
    1.27      {
    1.28          perfc_incra(bpt_updates, PERFC_MAX_PT_UPDATES - 1);
    1.29 @@ -2371,10 +2369,8 @@ void ptwr_flush(const int which)
    1.30  
    1.31  #ifdef PERF_COUNTERS
    1.32      /*
    1.33 -     * do a histogram for count. 
    1.34 -     * first bucket is for count=0,
    1.35 -     * second bucket is for count=1
    1.36 -     * last bucket is for count >= 63 *  PERFC_PT_UPDATES_BUCKET_SIZE
    1.37 +     * histogram: special treatment for 0 and 1 count. After that equally
    1.38 +     * spaced with last bucket taking the rest.
    1.39       */
    1.40      if ( count == 0 )
    1.41      {
    1.42 @@ -2382,10 +2378,10 @@ void ptwr_flush(const int which)
    1.43      } else if ( count == 1 ) 
    1.44      {
    1.45          perfc_incra(wpt_updates, 1);
    1.46 -    } else if ( (count / PERFC_PT_UPDATES_BUCKET_SIZE)
    1.47 +    } else if ( ((count-2) / PERFC_PT_UPDATES_BUCKET_SIZE)
    1.48                  < (PERFC_MAX_PT_UPDATES - 3) )
    1.49      {
    1.50 -        perfc_incra(wpt_updates, (count / PERFC_PT_UPDATES_BUCKET_SIZE) + 2);
    1.51 +        perfc_incra(wpt_updates, ((count-2)/PERFC_PT_UPDATES_BUCKET_SIZE) + 2);
    1.52      } else
    1.53      {
    1.54          perfc_incra(wpt_updates, PERFC_MAX_PT_UPDATES - 1);
     2.1 --- a/xen/arch/x86/x86_32/asm-offsets.c	Fri Feb 25 17:27:55 2005 +0000
     2.2 +++ b/xen/arch/x86/x86_32/asm-offsets.c	Tue Mar 01 13:47:27 2005 +0000
     2.3 @@ -5,6 +5,7 @@
     2.4   */
     2.5  
     2.6  #include <xen/sched.h>
     2.7 +#include <xen/config.h>
     2.8  
     2.9  #define DEFINE(_sym, _val) \
    2.10      __asm__ __volatile__ ( "\n->" #_sym " %0 " #_val : : "i" (_val) )
    2.11 @@ -69,6 +70,8 @@ void __dummy__(void)
    2.12  
    2.13      DEFINE(FIXMAP_apic_base, fix_to_virt(FIX_APIC_BASE));
    2.14  
    2.15 -    OFFSET(PERFC_hypercalls, struct perfcounter_t, hypercalls);
    2.16 -    OFFSET(PERFC_exceptions, struct perfcounter_t, exceptions);
    2.17 +#if PERF_COUNTERS
    2.18 +    OFFSET(PERFC_hypercalls, struct perfcounter, hypercalls);
    2.19 +    OFFSET(PERFC_exceptions, struct perfcounter, exceptions);
    2.20 +#endif
    2.21  }