trace default?
The xen trace facility is not enabled by default. I'm working on some tools that use it, and I'm concerned that the tool will not work for customers who buy packaged distro's. What are the arguments for keeping trace disabled? Is it just the memory consumed by the trace buffers? It doesn't appear to me that there would be any impact beyond that. What is the possibility of making tracing enabled by default?
Rob
Quoted 1 line · Rob Gardner
The xen trace facility is not enabled by default. I'm working on some tools that use it, and I'm concerned that the tool will not work for customers who buy packaged distro's. What are the arguments for keeping trace disabled? Is it just the memory consumed by the trace buffers? It doesn't appear to me that there would be any impact beyond that. What is the possibility of making tracing enabled by default?
It's up to the distros to decide what options they anable in their default Xen package imo.
-- Keir
Quoted 7 lines · Keir Fraser
Quoted 1 line · Rob Gardner
The xen trace facility is not enabled by default. I'm working on some tools that use it, and I'm concerned that the tool will not work for customers who buy packaged distro's. What are the arguments for keeping trace disabled? Is it just the memory consumed by the trace buffers? It doesn't appear to me that there would be any impact beyond that. What is the possibility of making tracing enabled by default?
It's up to the distros to decide what options they anable in their default Xen package imo.
Yes, but they are likely to stick with the xen defaults unless they have a reason for changing them. In the case of tracing, their reaction is likely to be that "tracing" sounds like some debugging feature, will probably be bad for performance, so let's leave it turned off. So could you state what performance impact you think tracing will actually have on the system?
Thanks,
Rob
Quoted 6 lines
Yes, but they are likely to stick with the xen defaults unless they have a reason for changing them. In the case of tracing, their reaction is likely to be that "tracing" sounds like some debugging feature, will probably be bad for performance, so let's leave it turned off. So could you state what performance impact you think tracing will actually have on the system?
Trace buffers can be disabled on the commandline to avoid the memory overhead and the cost of calling the "trace" function itself via the TRACE_xD macros should not be measurable.
Cheers,
Mark
For arguments' sake I'm attaching a (build tested, hg import-able) changeset I knocked up to unconditionally enable the trace buffer. The default size is 10 pages / online CPU (runtime configurable).
Cheers,
Mark
Quoted 11 lines
Quoted 6 lines
Yes, but they are likely to stick with the xen defaults unless they have a reason for changing them. In the case of tracing, their reaction is likely to be that "tracing" sounds like some debugging feature, will probably be bad for performance, so let's leave it turned off. So could you state what performance impact you think tracing will actually have on the system?
Trace buffers can be disabled on the commandline to avoid the memory overhead and the cost of calling the "trace" function itself via the
TRACE_xDmacros should not be measurable.
Quoted 7 lines
Cheers,
Mark_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
# HG changeset patch
# User mark@maw48
# Node ID 4aac20cac3df65f412328384935ad631edc09fde
# Parent e991ec23c3181136bb78b761053a0a6ea641eac1 Unconditionally compile trace buffer support. Continue to default to enable at boot (can disable manually if required).
xen/Rules.mk +0 -5
@@ -6,7 +6,6 @@ debug ?= n perfc ?= n perfc_arrays?= n -trace ?= n domu_debug ?= n crash_debug ?= n
@@ -70,10 +69,6 @@ endif endif -ifeq ($(trace),y) -CFLAGS += -DTRACE_BUFFER -endif - CFLAGS := $(strip $(CFLAGS)) %.o: %.c $(HDRS) Makefile
xen/arch/x86/vmx.c +0 -6
@@ -50,12 +50,8 @@unsigned int opt_vmx_debug_level =0 ;integer_param ("vmx_debug" , opt_vmx_debug_level); -#ifdef TRACE_BUFFER static unsigned long trace_values[NR_CPUS ][4 ];#define TRACE_VMEXIT (index,value) trace_values[current->processor][index]=value -#else -#define TRACE_VMEXIT (index,value) ((void)0) -#endif #ifdef __x86_64__static struct msr_state percpu_msr[NR_CPUS ];
@@ -1813,7 +1809,6 @@#endif } -#ifdef TRACE_BUFFER asmlinkage void trace_vmentry (void) { TRACE_5D(TRC_VMENTRY,trace_values[current->processor][0],
@@ -1831,7 +1826,6 @@TRACE_3D (TRC_VMEXIT ,0 ,0 ,0 ); return; } -#endif #endif /* CONFIG_VMX */ /*
xen/arch/x86/x86_32/entry.S +0 -4
@@ -126,9 +126,7 @@ ENTRY(vmx_asm_vmexit_handler) /* selectors are restored/saved by VMX */ VMX_SAVE_ALL_NOSEGREGS -#ifdef TRACE_BUFFER call trace_vmexit -#endif call vmx_vmexit_handler jmp vmx_asm_do_resume
@@ -150,9 +148,7 @@ /* vmx_restore_all_guest */ call vmx_intr_assist call load_cr2 -#ifdef TRACE_BUFFER call trace_vmentry -#endif .endif VMX_RESTORE_ALL_NOSEGREGS /*
xen/common/Makefile +0 -4
@@ -9,10 +9,6 @@ OBJS := $(subst perfc.o,,$(OBJS)) endif -ifneq ($(trace),y) -OBJS := $(subst trace.o,,$(OBJS)) -endif - default: common.o common.o: $(OBJS) $(LD) $(LDFLAGS) -r -o common.o $(OBJS)
xen/common/dom0_ops.c +0 -2
@@ -480,14 +480,12 @@ }break ; -#ifdef TRACE_BUFFER case DOM0_TBUFCONTROL : { ret =tb_control (&op->u.tbufcontrol);copy_to_user (u_dom0_op, op,sizeof (*op)); }break ; -#endif case DOM0_READCONSOLE : {
xen/include/xen/trace.h +0 -15
@@ -22,8 +22,6 @@#ifndef __XEN_TRACE_H__#define __XEN_TRACE_H__ - -#ifdef TRACE_BUFFER #include <asm/page.h> #include <xen/types.h>
@@ -120,17 +118,4 @@#define TRACE_4D (event,d1,d2,d3,d4) trace_do_casts(event,d1,d2,d3,d4,0 )#define TRACE_5D (event,d1,d2,d3,d4,d5) trace_do_casts(event,d1,d2,d3,d4,d5) -#else - -#define init_trace_bufs () ((void)0) - -#define TRACE_0D (event) ((void)0) -#define TRACE_1D (event,d) ((void)0) -#define TRACE_2D (event,d1,d2) ((void)0) -#define TRACE_3D (event,d1,d2,d3) ((void)0) -#define TRACE_4D (event,d1,d2,d3,d4) ((void)0) -#define TRACE_5D (event,d1,d2,d3,d4,d5) ((void)0) - -#endif /* TRACE_BUFFER */ -#endif /* __XEN_TRACE_H__ */
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel