ia64/xen-unstable

changeset 11708:3f28ffed6fff

[IA64] add perfcounter for vTLB flush.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author awilliam@xenbuild.aw
date Mon Oct 02 21:34:47 2006 -0600 (2006-10-02)
parents a3a079af0e92
children ce9816c14040
files xen/arch/ia64/xen/domain.c xen/arch/ia64/xen/vhpt.c xen/include/asm-ia64/perfc_defn.h
line diff
     1.1 --- a/xen/arch/ia64/xen/domain.c	Mon Oct 02 21:32:46 2006 -0600
     1.2 +++ b/xen/arch/ia64/xen/domain.c	Mon Oct 02 21:34:47 2006 -0600
     1.3 @@ -101,6 +101,7 @@ static void flush_vtlb_for_context_switc
     1.4  			vhpt_flush();
     1.5  		}
     1.6  		local_flush_tlb_all();
     1.7 +		perfc_incrc(flush_vtlb_for_context_switch);
     1.8  	}
     1.9  }
    1.10  
     2.1 --- a/xen/arch/ia64/xen/vhpt.c	Mon Oct 02 21:32:46 2006 -0600
     2.2 +++ b/xen/arch/ia64/xen/vhpt.c	Mon Oct 02 21:34:47 2006 -0600
     2.3 @@ -155,6 +155,8 @@ void vcpu_flush_vtlb_all(struct vcpu *v)
     2.4  	/* We could clear bit in d->domain_dirty_cpumask only if domain d in
     2.5  	   not running on this processor.  There is currently no easy way to
     2.6  	   check this.  */
     2.7 +
     2.8 +	perfc_incrc(vcpu_flush_vtlb_all);
     2.9  }
    2.10  
    2.11  static void __vcpu_flush_vtlb_all(void *vcpu)
    2.12 @@ -178,6 +180,7 @@ void domain_flush_vtlb_all (void)
    2.13  						 __vcpu_flush_vtlb_all,
    2.14  						 v, 1, 1);
    2.15  	}
    2.16 +	perfc_incrc(domain_flush_vtlb_all);
    2.17  }
    2.18  
    2.19  static void cpu_flush_vhpt_range (int cpu, u64 vadr, u64 addr_range)
    2.20 @@ -200,6 +203,7 @@ void vcpu_flush_tlb_vhpt_range (u64 vadr
    2.21  	cpu_flush_vhpt_range (current->processor, vadr, 1UL << log_range);
    2.22  	ia64_ptcl(vadr, log_range << 2);
    2.23  	ia64_srlz_i();
    2.24 +	perfc_incrc(vcpu_flush_tlb_vhpt_range);
    2.25  }
    2.26  
    2.27  void domain_flush_vtlb_range (struct domain *d, u64 vadr, u64 addr_range)
    2.28 @@ -236,6 +240,7 @@ void domain_flush_vtlb_range (struct dom
    2.29  
    2.30  	/* ptc.ga  */
    2.31  	ia64_global_tlb_purge(vadr,vadr+addr_range,PAGE_SHIFT);
    2.32 +	perfc_incrc(domain_flush_vtlb_range);
    2.33  }
    2.34  
    2.35  static void flush_tlb_vhpt_all (struct domain *d)
     3.1 --- a/xen/include/asm-ia64/perfc_defn.h	Mon Oct 02 21:32:46 2006 -0600
     3.2 +++ b/xen/include/asm-ia64/perfc_defn.h	Mon Oct 02 21:34:47 2006 -0600
     3.3 @@ -107,3 +107,12 @@ PERFSTATUS(privop_addr_##name##_overflow
     3.4  PERFPRIVOPADDR(get_ifa)
     3.5  PERFPRIVOPADDR(thash)
     3.6  #endif
     3.7 +
     3.8 +// vhpt.c
     3.9 +PERFCOUNTER_CPU(vcpu_flush_vtlb_all,            "vcpu_flush_vtlb_all")
    3.10 +PERFCOUNTER_CPU(domain_flush_vtlb_all,          "domain_flush_vtlb_all")
    3.11 +PERFCOUNTER_CPU(vcpu_flush_tlb_vhpt_range,      "vcpu_flush_tlb_vhpt_range")
    3.12 +PERFCOUNTER_CPU(domain_flush_vtlb_range,        "domain_flush_vtlb_range")
    3.13 +
    3.14 +// domain.c
    3.15 +PERFCOUNTER_CPU(flush_vtlb_for_context_switch,  "flush_vtlb_for_context_switch")