[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] added performance counters for hypercalls and exceptions
ChangeSet 1.1238, 2005/02/25 17:27:21+00:00, rneugeba@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx added performance counters for hypercalls and exceptions Signed-off-by: michael.fetterman@xxxxxxxxxxxx arch/x86/x86_32/asm-offsets.c | 3 +++ arch/x86/x86_32/entry.S | 10 ++++++++-- common/perfc.c | 2 +- include/xen/perfc_defn.h | 2 ++ 4 files changed, 14 insertions(+), 3 deletions(-) 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:05:30 -04:00 +++ b/xen/arch/x86/x86_32/asm-offsets.c 2005-04-05 12:05:30 -04:00 @@ -68,4 +68,7 @@ BLANK(); DEFINE(FIXMAP_apic_base, fix_to_virt(FIX_APIC_BASE)); + + OFFSET(PERFC_hypercalls, struct perfcounter_t, hypercalls); + OFFSET(PERFC_exceptions, struct perfcounter_t, exceptions); } diff -Nru a/xen/arch/x86/x86_32/entry.S b/xen/arch/x86/x86_32/entry.S --- a/xen/arch/x86/x86_32/entry.S 2005-04-05 12:05:30 -04:00 +++ b/xen/arch/x86/x86_32/entry.S 2005-04-05 12:05:30 -04:00 @@ -60,7 +60,7 @@ #include <asm/apicdef.h> #include <asm/page.h> #include <public/xen.h> - + #define GET_CURRENT(reg) \ movl $STACK_SIZE-4, reg; \ orl %esp, reg; \ @@ -278,8 +278,11 @@ subl $4,%esp SAVE_ALL(b) sti +#ifdef PERF_COUNTERS + lock incl SYMBOL_NAME(perfcounters)+PERFC_hypercalls(,%eax,4) +#endif GET_CURRENT(%ebx) - andl $(NR_hypercalls-1),%eax + andl $(NR_hypercalls-1),%eax call *SYMBOL_NAME(hypercall_table)(,%eax,4) movl %eax,XREGS_eax(%esp) # save the return value @@ -466,6 +469,9 @@ movw XREGS_entry_vector(%esp),%ax movl %esp,%edx pushl %edx # push the xen_regs pointer +#ifdef PERF_COUNTERS + lock incl SYMBOL_NAME(perfcounters)+PERFC_exceptions(,%eax,4) +#endif GET_CURRENT(%ebx) call *SYMBOL_NAME(exception_table)(,%eax,4) addl $4,%esp diff -Nru a/xen/common/perfc.c b/xen/common/perfc.c --- a/xen/common/perfc.c 2005-04-05 12:05:30 -04:00 +++ b/xen/common/perfc.c 2005-04-05 12:05:30 -04:00 @@ -66,7 +66,7 @@ case TYPE_S_ARRAY: for ( j = sum = 0; j < perfc_info[i].nr_elements; j++ ) sum += atomic_read(&counters[j]); - printk("TOTAL[%10d]\n ", sum); + printk("TOTAL[%10d] ", sum); for ( j = 0; j < perfc_info[i].nr_elements; j++ ) { printk("A%02d[%10d] ", j, atomic_read(&counters[j])); diff -Nru a/xen/include/xen/perfc_defn.h b/xen/include/xen/perfc_defn.h --- a/xen/include/xen/perfc_defn.h 2005-04-05 12:05:30 -04:00 +++ b/xen/include/xen/perfc_defn.h 2005-04-05 12:05:30 -04:00 @@ -41,6 +41,8 @@ PERFCOUNTER_ARRAY( wpt_updates, "writable pt updates", PERFC_MAX_PT_UPDATES ) PERFCOUNTER_ARRAY( bpt_updates, "batched pt updates", PERFC_MAX_PT_UPDATES ) +PERFCOUNTER_ARRAY( hypercalls, "hypercalls", NR_hypercalls ) +PERFCOUNTER_ARRAY( exceptions, "exceptions", 32 ) /* XXX constant */ #define VMX_PERF_EXIT_REASON_SIZE 37 #define VMX_PERF_VECTOR_SIZE 0x20 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |