bitkeeper revision 1.1159.259.1 (420d50b3Mu97o7HHZsGGVPlv3ORCOw)

Some VT-x software perf counters.
Signed-off-by: ian.pratt@cl.cam.ac.uk
This commit is contained in:
iap10@freefall.cl.cam.ac.uk committed 2005-02-12 00:41:23 +00:00
1 parent 0e05a6b2c7
commit e8a790c9aa
3 files changed
+21 -4

No files matched your search

+4
View File
@@ -685,6 +685,8 @@ asmlinkage void vmx_vmexit_handler(struct xen_regs regs)
if ((error = __vmread(VM_EXIT_REASON, &exit_reason)))
__vmx_bug(&regs);
perfc_incra(vmexits, exit_reason);
__vmread(IDT_VECTORING_INFO_FIELD, &idtv_info_field);
if (idtv_info_field & INTR_INFO_VALID_MASK) {
__vmwrite(VM_ENTRY_INTR_INFO_FIELD, idtv_info_field);
@@ -729,6 +731,8 @@ asmlinkage void vmx_vmexit_handler(struct xen_regs regs)
__vmx_bug(&regs);
vector &= 0xff;
perfc_incra(cause_vector, vector);
switch (vector) {
#ifdef XEN_DEBUGGER
case VECTOR_DB:
+12 -4
View File
@@ -55,17 +55,25 @@ extern struct perfcounter_t perfcounters;
#define perfc_value(x) atomic_read(&perfcounters.x[0])
#define perfc_valuec(x) atomic_read(&perfcounters.x[smp_processor_id()])
#define perfc_valuea(x,y) atomic_read(&perfcounters.x[y])
#define perfc_valuea(x,y) \
{ if(y<(sizeof(perfcounters.x)/sizeof(*perfcounters.x))) \
atomic_read(&perfcounters.x[y]); }
#define perfc_set(x,v) atomic_set(&perfcounters.x[0], v)
#define perfc_setc(x,v) atomic_set(&perfcounters.x[smp_processor_id()], v)
#define perfc_seta(x,y,v) atomic_set(&perfcounters.x[y], v)
#define perfc_seta(x,y,v) \
{ if(y<(sizeof(perfcounters.x)/sizeof(*perfcounters.x))) \
atomic_set(&perfcounters.x[y], v); }
#define perfc_incr(x) atomic_inc(&perfcounters.x[0])
#define perfc_decr(x) atomic_dec(&perfcounters.x[0])
#define perfc_incrc(x) atomic_inc(&perfcounters.x[smp_processor_id()])
#define perfc_incra(x,y) atomic_inc(&perfcounters.x[y])
#define perfc_incra(x,y) \
{ if(y<(sizeof(perfcounters.x)/sizeof(*perfcounters.x))) \
atomic_inc(&perfcounters.x[y]); }
#define perfc_add(x,y) atomic_add((y), &perfcounters.x[0])
#define perfc_addc(x,y) atomic_add((y), &perfcounters.x[smp_processor_id()])
#define perfc_adda(x,y,z) atomic_add((z), &perfcounters.x[y])
#define perfc_adda(x,y,z) \
{ if(y<(sizeof(perfcounters.x)/sizeof(*perfcounters.x))) \
atomic_add((z), &perfcounters.x[y]); }
#else /* PERF_COUNTERS */
+5
View File
@@ -30,3 +30,8 @@ PERFCOUNTER_CPU( shadow_update_va_fail, "shadow_update_va_fail" )
/* STATUS counters do not reset when 'P' is hit */
PERFSTATUS( shadow_l2_pages, "current # shadow L2 pages" )
PERFSTATUS( shadow_l1_pages, "current # shadow L1 pages" )
#define VMX_PERF_EXIT_REASON_SIZE 37
#define VMX_PERF_VECTOR_SIZE 0x20
PERFCOUNTER_ARRAY(vmexits, "vmexits", VMX_PERF_EXIT_REASON_SIZE )
PERFCOUNTER_ARRAY(cause_vector, "cause vector", VMX_PERF_VECTOR_SIZE )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.