Skip to contentSkip to conversation

trace default?

DISCUSSION Rob Gardner 3 participants 5 messages Sep 6, 2005 – Sep 7, 2005

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
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

#2 lore raw
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

#3 lore raw
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

#4 lore raw

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_xD macros 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
diff -r e991ec23c318 -r 4aac20cac3df xen/Rules.mk
@@ -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
diff -r e991ec23c318 -r 4aac20cac3df xen/arch/x86/vmx.c
@@ -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
diff -r e991ec23c318 -r 4aac20cac3df xen/arch/x86/x86_32/entry.S
@@ -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
diff -r e991ec23c318 -r 4aac20cac3df xen/common/Makefile
@@ -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
diff -r e991ec23c318 -r 4aac20cac3df xen/common/dom0_ops.c
@@ -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
diff -r e991ec23c318 -r 4aac20cac3df xen/include/xen/trace.h
@@ -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