[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Add additional stats to track VHPT saturation
# HG changeset patch # User djm@xxxxxxxxxxxxxxx # Node ID aecdccb1a35026aee872c5a0a7235bd6d74244ca # Parent b52a4864477057a43ab9bc4c82538650f8256880 Add additional stats to track VHPT saturation diff -r b52a48644770 -r aecdccb1a350 xen/arch/ia64/xen/privop.c --- a/xen/arch/ia64/xen/privop.c Fri Sep 16 22:53:30 2005 +++ b/xen/arch/ia64/xen/privop.c Fri Sep 16 22:54:53 2005 @@ -1107,6 +1107,7 @@ #ifdef PRIVOP_ADDR_COUNT n += dump_privop_addrs(buf + n); #endif + n += dump_vhpt_stats(buf + n); n += dump_misc_stats(buf + n); if (len < TMPBUFLEN) return -1; if (__copy_to_user(ubuf,buf,n)) return -1; @@ -1122,6 +1123,7 @@ #ifdef PRIVOP_ADDR_COUNT zero_privop_addrs(); #endif + zero_vhpt_stats(); zero_misc_stats(); zero_reflect_counts(); if (len < TMPBUFLEN) return -1; diff -r b52a48644770 -r aecdccb1a350 xen/arch/ia64/xen/vhpt.c --- a/xen/arch/ia64/xen/vhpt.c Fri Sep 16 22:53:30 2005 +++ b/xen/arch/ia64/xen/vhpt.c Fri Sep 16 22:54:53 2005 @@ -149,3 +149,24 @@ vhpt_flush(); } + +void zero_vhpt_stats(void) +{ + return; +} + +int dump_vhpt_stats(char *buf) +{ + int i; + char *s = buf; + struct vhpt_lf_entry *v = (void *)VHPT_ADDR; + unsigned long vhpt_valid = 0, vhpt_chains = 0; + + for (i = 0; i < VHPT_NUM_ENTRIES; i++, v++) { + if (!(v->ti_tag & INVALID_TI_TAG)) vhpt_valid++; + if (v->CChain) vhpt_chains++; + } + s += sprintf(s,"VHPT usage: %ld/%ld (%ld collision chains)\n", + vhpt_valid,VHPT_NUM_ENTRIES,vhpt_chains); + return s - buf; +} _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |