ia64/xen-unstable

changeset 674:dc4e1de5713d

bitkeeper revision 1.389 (3f28df19Z3T_sAYRfO2FBURRnxpp_w)

dev.c, perfc_defn.h, perfc.c, domain_page.c:
Perfctr hacks and additions.
author kaf24@scramble.cl.cam.ac.uk
date Thu Jul 31 09:19:21 2003 +0000 (2003-07-31)
parents 3b0deaef4953
children 7678e3defee2
files xen/common/domain_page.c xen/common/perfc.c xen/include/xeno/perfc_defn.h xen/net/dev.c
line diff
     1.1 --- a/xen/common/domain_page.c	Wed Jul 30 21:39:24 2003 +0000
     1.2 +++ b/xen/common/domain_page.c	Thu Jul 31 09:19:21 2003 +0000
     1.3 @@ -14,6 +14,7 @@
     1.4  #include <xeno/config.h>
     1.5  #include <xeno/sched.h>
     1.6  #include <xeno/mm.h>
     1.7 +#include <xeno/perfc.h>
     1.8  #include <asm/domain_page.h>
     1.9  #include <asm/pgalloc.h>
    1.10  
    1.11 @@ -30,6 +31,7 @@ static void flush_all_ready_maps(void)
    1.12      do { if ( (*cache & READY_FOR_TLB_FLUSH) ) *cache = 0; }
    1.13      while ( ((unsigned long)(++cache) & ~PAGE_MASK) != 0 );
    1.14  
    1.15 +    perfc_incr(domain_page_tlb_flush);
    1.16      local_flush_tlb();
    1.17  }
    1.18  
     2.1 --- a/xen/common/perfc.c	Wed Jul 30 21:39:24 2003 +0000
     2.2 +++ b/xen/common/perfc.c	Thu Jul 31 09:19:21 2003 +0000
     2.3 @@ -34,29 +34,31 @@ void perfc_printall(u_char key, void *de
     2.4  
     2.5      for ( i = 0; i < NR_PERFCTRS; i++ ) 
     2.6      {
     2.7 +        printk("%20s  ",  perfc_info[i].name);
     2.8          switch ( perfc_info[i].type )
     2.9          {
    2.10          case TYPE_SINGLE:
    2.11 -            printk("%10d  0x%08x  %s\n", 
    2.12 -                   atomic_read(&counters[0]), atomic_read(&counters[0]), 
    2.13 -                   perfc_info[i].name);
    2.14 +            printk("%10d  0x%08x",
    2.15 +                   atomic_read(&counters[0]), 
    2.16 +                   atomic_read(&counters[0]));
    2.17              counters += 1;
    2.18              break;
    2.19          case TYPE_CPU:
    2.20              for ( j = 0; j < smp_num_cpus; j++ )
    2.21 -                printk("%10d  0x%08x  %s[CPU %02d]\n",
    2.22 -                       atomic_read(&counters[j]), atomic_read(&counters[j]), 
    2.23 -                       perfc_info[i].name, j);
    2.24 +                printk("CPU%02d[%10d 0x%08x]  ",
    2.25 +                       j, atomic_read(&counters[j]), 
    2.26 +                       atomic_read(&counters[j]));
    2.27              counters += NR_CPUS;
    2.28              break;
    2.29          case TYPE_ARRAY:
    2.30              for ( j = 0; j < perfc_info[i].nr_elements; j++ )
    2.31 -                printk("%10d  0x%08x  %s[ARR %02d]\n",
    2.32 -                       atomic_read(&counters[j]), atomic_read(&counters[j]), 
    2.33 -                       perfc_info[i].name, j);
    2.34 +                printk("ARR%02d[%10d 0x%08x]  ",
    2.35 +                       j, atomic_read(&counters[j]), 
    2.36 +                       atomic_read(&counters[j]));
    2.37              counters += j;
    2.38              break;
    2.39          }
    2.40 +        printk("\n");
    2.41      }
    2.42  }
    2.43  
     3.1 --- a/xen/include/xeno/perfc_defn.h	Wed Jul 30 21:39:24 2003 +0000
     3.2 +++ b/xen/include/xeno/perfc_defn.h	Thu Jul 31 09:19:21 2003 +0000
     3.3 @@ -13,3 +13,6 @@ PERFCOUNTER( net_hypercalls, "network hy
     3.4  PERFCOUNTER( net_rx_capacity_drop, "net rx capacity drop" )
     3.5  PERFCOUNTER( net_rx_delivered, "net rx delivered" )
     3.6  PERFCOUNTER( net_rx_tlbflush, "net rx tlb flushes" )
     3.7 +PERFCOUNTER( net_tx_transmitted, "net tx transmitted" )
     3.8 +
     3.9 +PERFCOUNTER( domain_page_tlb_flush, "domain page tlb flushes" )
     4.1 --- a/xen/net/dev.c	Wed Jul 30 21:39:24 2003 +0000
     4.2 +++ b/xen/net/dev.c	Thu Jul 31 09:19:21 2003 +0000
     4.3 @@ -800,6 +800,8 @@ static void net_tx_action(unsigned long 
     4.4              kfree_skb(skb);
     4.5              break;
     4.6          }
     4.7 +
     4.8 +        perfc_incr(net_tx_transmitted);
     4.9      }
    4.10      spin_unlock(&dev->xmit_lock);
    4.11  }