direct-io.hg

changeset 6479:a66a41032226

Some fixes to the performance counters code.
Signed-off-by: Ross McIlroy <mcilrorc@dcs.gla.ac.uk>
author kaf24@firebug.cl.cam.ac.uk
date Tue Aug 30 17:00:26 2005 +0000 (2005-08-30)
parents 6b48b53b682d
children 1b9f23175fa8
files tools/misc/cpuperf/cpuperf.c xen/include/xen/perfc.h
line diff
     1.1 --- a/tools/misc/cpuperf/cpuperf.c	Tue Aug 30 16:53:40 2005 +0000
     1.2 +++ b/tools/misc/cpuperf/cpuperf.c	Tue Aug 30 17:00:26 2005 +0000
     1.3 @@ -243,16 +243,12 @@ int main(int argc, char **argv)
     1.4      }
     1.5  
     1.6      if (read) {
     1.7 -        while((cpu_mask&1)) {
     1.8 -            int i;
     1.9 -            for (i=0x300;i<0x312;i++) {
    1.10 -                printf("%010llu ",cpus_rdmsr( cpu_mask, i ) );
    1.11 -            }
    1.12 -            printf("\n");
    1.13 -            cpu_mask>>=1;
    1.14 -        }
    1.15 +        int i;
    1.16 +        for (i=0x300;i<0x312;i++)
    1.17 +            printf("%010llu ",cpus_rdmsr( cpu_mask, i ) );
    1.18 +        printf("\n");
    1.19          exit(1);
    1.20 -    } 
    1.21 +    }
    1.22      
    1.23      if (!escr) {
    1.24          fprintf(stderr, "Need an ESCR.\n");
     2.1 --- a/xen/include/xen/perfc.h	Tue Aug 30 16:53:40 2005 +0000
     2.2 +++ b/xen/include/xen/perfc.h	Tue Aug 30 17:00:26 2005 +0000
     2.3 @@ -4,6 +4,7 @@
     2.4  
     2.5  #ifdef PERF_COUNTERS
     2.6  
     2.7 +#include <xen/lib.h>
     2.8  #include <asm/atomic.h>
     2.9  
    2.10  /* 
    2.11 @@ -87,7 +88,7 @@ extern struct perfcounter perfcounters;
    2.12   * Histogram: special treatment for 0 and 1 count. After that equally spaced 
    2.13   * with last bucket taking the rest.
    2.14   */
    2.15 -#ifdef PERFC_ARRAYS
    2.16 +#ifdef PERF_ARRAYS
    2.17  #define perfc_incr_histo(_x,_v,_n)                                          \
    2.18      do {                                                                    \
    2.19          if ( (_v) == 0 )                                                    \