ia64/xen-unstable

changeset 17844:882eb6186c2d

x86: add perf counter for pointless updates of writable pages through a hypercall
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 12 16:11:39 2008 +0100 (2008-06-12)
parents a3319f32496f
children 7cf53a91c3a3
files xen/arch/x86/mm.c xen/include/asm-x86/perfc_defn.h
line diff
     1.1 --- a/xen/arch/x86/mm.c	Thu Jun 12 16:09:08 2008 +0100
     1.2 +++ b/xen/arch/x86/mm.c	Thu Jun 12 16:11:39 2008 +0100
     1.3 @@ -2602,6 +2602,8 @@ int do_mmu_update(
     1.4                  if ( unlikely(!get_page_type(page, PGT_writable_page)) )
     1.5                      break;
     1.6  
     1.7 +                perfc_incr(writable_mmu_updates);
     1.8 +
     1.9                  okay = paging_write_guest_entry(v, va, req.val, _mfn(mfn));
    1.10  
    1.11                  put_page_type(page);
     2.1 --- a/xen/include/asm-x86/perfc_defn.h	Thu Jun 12 16:09:08 2008 +0100
     2.2 +++ b/xen/include/asm-x86/perfc_defn.h	Thu Jun 12 16:11:39 2008 +0100
     2.3 @@ -23,6 +23,7 @@ PERFCOUNTER(calls_to_mmuext_op,         
     2.4  PERFCOUNTER(num_mmuext_ops,             "mmuext ops")
     2.5  PERFCOUNTER(calls_to_mmu_update,        "calls to mmu_update")
     2.6  PERFCOUNTER(num_page_updates,           "page updates")
     2.7 +PERFCOUNTER(writable_mmu_updates,       "mmu_updates of writable pages")
     2.8  PERFCOUNTER(calls_to_update_va,         "calls to update_va_map")
     2.9  PERFCOUNTER(page_faults,            "page faults")
    2.10  PERFCOUNTER(copy_user_faults,       "copy_user faults")