diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-03-24 10:59:31 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-03-24 10:59:31 +0100 |
commit | 7e273af3ec8363a4d961119d0f055ca8d78ba31f (patch) | |
tree | 101b2dea4673408bb4a52085a93f8752521515b9 | |
parent | 3095cdaf509be61190dfe2554ef6aee6bfbb4a4f (diff) | |
download | xen-7e273af3ec8363a4d961119d0f055ca8d78ba31f.tar.gz xen-7e273af3ec8363a4d961119d0f055ca8d78ba31f.tar.bz2 xen-7e273af3ec8363a4d961119d0f055ca8d78ba31f.zip |
This patch is mainly a cleanup of vmx related xentrace code. One minor
xentrace bug is fixed.
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
Signed-off-by: Yunfeng Zhao <yunfeng.zhao@intel.com>
-rw-r--r-- | tools/xentrace/Makefile | 2 | ||||
-rw-r--r-- | tools/xentrace/formats | 4 | ||||
-rw-r--r-- | tools/xentrace/xentrace.c | 2 | ||||
-rw-r--r-- | xen/arch/x86/hvm/vmx/vmx.c | 9 | ||||
-rw-r--r-- | xen/include/public/trace.h | 6 |
5 files changed, 9 insertions, 14 deletions
diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile index 1d66129c8d..b02a39b18e 100644 --- a/tools/xentrace/Makefile +++ b/tools/xentrace/Makefile @@ -6,7 +6,7 @@ INSTALL_DATA = $(INSTALL) -m0644 XEN_ROOT=../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror +CFLAGS += -Werror -D_LARGEFILE64_SOURCE CFLAGS += -I $(XEN_XC) CFLAGS += -I $(XEN_LIBXC) diff --git a/tools/xentrace/formats b/tools/xentrace/formats index 818eef1c60..96ba53212c 100644 --- a/tools/xentrace/formats +++ b/tools/xentrace/formats @@ -16,6 +16,6 @@ 0x00080002 CPU%(cpu)d %(tsc)d VMX_VECTOR [ domid = 0x%(1)08x, eip = 0x%(2)08x, vector = 0x%(3)08x ] 0x00080003 CPU%(cpu)d %(tsc)d VMX_INT [ domid = 0x%(1)08x, trap = 0x%(2)08x, va = 0x%(3)08x ] -0x00090001 CPU%(cpu)d %(tsc)d VMENTRY 0x%(1)08x 0x%(2)08x 0x%(3)08x 0x%(4)08x 0x%(5)08x -0x00090002 CPU%(cpu)d %(tsc)d VMEXIT 0x%(1)08x 0x%(2)08x 0x%(3)08x +0x00081001 CPU%(cpu)d %(tsc)d VMEXIT 0x%(1)08x 0x%(2)08x 0x%(3)08x +0x00081002 CPU%(cpu)d %(tsc)d VMENTRY 0x%(1)08x 0x%(2)08x 0x%(3)08x 0x%(4)08x 0x%(5)08x diff --git a/tools/xentrace/xentrace.c b/tools/xentrace/xentrace.c index 34b2a6a649..ee320c31dc 100644 --- a/tools/xentrace/xentrace.c +++ b/tools/xentrace/xentrace.c @@ -498,7 +498,7 @@ int main(int argc, char **argv) } if ( opts.outfile ) - outfd = open(opts.outfile, O_WRONLY | O_CREAT); + outfd = open(opts.outfile, O_WRONLY | O_CREAT | O_LARGEFILE, 0644); if(outfd < 0) { diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 69af5901dc..1c1a9fb8fa 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -988,7 +988,7 @@ static void vmx_io_instruction(struct cpu_user_regs *regs, port = (exit_qualification >> 16) & 0xFFFF; else port = regs->edx & 0xffff; - TRACE_VMEXIT(2, port); + TRACE_VMEXIT(1, port); size = (exit_qualification & 7) + 1; dir = test_bit(3, &exit_qualification); /* direction */ @@ -1913,6 +1913,7 @@ static inline void vmx_vmexit_do_extint(struct cpu_user_regs *regs) vector &= 0xff; local_irq_disable(); + TRACE_VMEXIT(1,vector); switch(vector) { case LOCAL_TIMER_VECTOR: @@ -2042,7 +2043,6 @@ asmlinkage void vmx_vmexit_handler(struct cpu_user_regs regs) { __vmread(GUEST_RIP, &eip); - TRACE_3D(TRC_VMX_VMEXIT, v->domain->domain_id, eip, exit_reason); TRACE_VMEXIT(0,exit_reason); } @@ -2066,7 +2066,6 @@ asmlinkage void vmx_vmexit_handler(struct cpu_user_regs regs) TRACE_VMEXIT(1,vector); perfc_incra(cause_vector, vector); - TRACE_3D(TRC_VMX_VECTOR, v->domain->domain_id, eip, vector); switch (vector) { #ifdef XEN_DEBUGGER case TRAP_debug: @@ -2250,7 +2249,7 @@ asmlinkage void vmx_load_cr2(void) asmlinkage void vmx_trace_vmentry (void) { - TRACE_5D(TRC_VMENTRY, + TRACE_5D(TRC_VMX_VMENTRY, trace_values[smp_processor_id()][0], trace_values[smp_processor_id()][1], trace_values[smp_processor_id()][2], @@ -2266,7 +2265,7 @@ asmlinkage void vmx_trace_vmentry (void) asmlinkage void vmx_trace_vmexit (void) { - TRACE_3D(TRC_VMEXIT,0,0,0); + TRACE_3D(TRC_VMX_VMEXIT,0,0,0); return; } diff --git a/xen/include/public/trace.h b/xen/include/public/trace.h index cba4b261ca..8fc009dfeb 100644 --- a/xen/include/public/trace.h +++ b/xen/include/public/trace.h @@ -24,7 +24,6 @@ #define TRC_VMXTIMER 0x00082000 /* VMX timer trace */ #define TRC_VMXINT 0x00084000 /* VMX interrupt trace */ #define TRC_VMXIO 0x00088000 /* VMX io emulation trace */ -#define TRC_VMEXIT_HANDLER 0x00090000 /* VMX handler trace */ /* Trace events per class */ @@ -50,15 +49,12 @@ /* trace events per subclass */ #define TRC_VMX_VMEXIT (TRC_VMXEXIT + 1) -#define TRC_VMX_VECTOR (TRC_VMXEXIT + 2) +#define TRC_VMX_VMENTRY (TRC_VMXEXIT + 2) #define TRC_VMX_TIMER_INTR (TRC_VMXTIMER + 1) #define TRC_VMX_INT (TRC_VMXINT + 1) -#define TRC_VMEXIT (TRC_VMEXIT_HANDLER + 1) -#define TRC_VMENTRY (TRC_VMEXIT_HANDLER + 2) - /* This structure represents a single trace buffer record. */ struct t_rec { |