All of lore.kernel.org
 help / color / mirror / Atom feed
* trace default?
@ 2005-09-06 22:51 Rob Gardner
  2005-09-07  9:48 ` Keir Fraser
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Gardner @ 2005-09-06 22:51 UTC (permalink / raw)
  To: xen-devel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: trace default?
  2005-09-06 22:51 trace default? Rob Gardner
@ 2005-09-07  9:48 ` Keir Fraser
  2005-09-07 15:45   ` Rob Gardner
  0 siblings, 1 reply; 5+ messages in thread
From: Keir Fraser @ 2005-09-07  9:48 UTC (permalink / raw)
  To: Rob Gardner; +Cc: xen-devel


On 6 Sep 2005, at 23:51, Rob Gardner wrote:

> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: trace default?
  2005-09-07  9:48 ` Keir Fraser
@ 2005-09-07 15:45   ` Rob Gardner
  2005-09-07 16:00     ` Mark Williamson
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Gardner @ 2005-09-07 15:45 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel

Keir Fraser wrote:

>
> On 6 Sep 2005, at 23:51, Rob Gardner wrote:
>
>> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: trace default?
  2005-09-07 15:45   ` Rob Gardner
@ 2005-09-07 16:00     ` Mark Williamson
  2005-09-07 16:54       ` [PATCH] " Mark Williamson
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Williamson @ 2005-09-07 16:00 UTC (permalink / raw)
  To: xen-devel; +Cc: Rob Gardner

> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] trace default?
  2005-09-07 16:00     ` Mark Williamson
@ 2005-09-07 16:54       ` Mark Williamson
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Williamson @ 2005-09-07 16:54 UTC (permalink / raw)
  To: xen-devel; +Cc: Rob Gardner

[-- Attachment #1: Type: text/plain, Size: 968 bytes --]

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

> > 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
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

[-- Attachment #2: trace-enable.patch --]
[-- Type: text/x-diff, Size: 3907 bytes --]

# 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).

Signed-off-by: Mark Williamson <mark.williamson@cl.cam.ac.uk>

diff -r e991ec23c318 -r 4aac20cac3df xen/Rules.mk
--- a/xen/Rules.mk	Wed Sep  7 12:49:52 2005
+++ b/xen/Rules.mk	Wed Sep  7 16:50:27 2005
@@ -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
diff -r e991ec23c318 -r 4aac20cac3df xen/arch/x86/vmx.c
--- a/xen/arch/x86/vmx.c	Wed Sep  7 12:49:52 2005
+++ b/xen/arch/x86/vmx.c	Wed Sep  7 16:50:27 2005
@@ -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 */
 
 /*
diff -r e991ec23c318 -r 4aac20cac3df xen/arch/x86/x86_32/entry.S
--- a/xen/arch/x86/x86_32/entry.S	Wed Sep  7 12:49:52 2005
+++ b/xen/arch/x86/x86_32/entry.S	Wed Sep  7 16:50:27 2005
@@ -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
         /* 
diff -r e991ec23c318 -r 4aac20cac3df xen/common/Makefile
--- a/xen/common/Makefile	Wed Sep  7 12:49:52 2005
+++ b/xen/common/Makefile	Wed Sep  7 16:50:27 2005
@@ -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)
diff -r e991ec23c318 -r 4aac20cac3df xen/common/dom0_ops.c
--- a/xen/common/dom0_ops.c	Wed Sep  7 12:49:52 2005
+++ b/xen/common/dom0_ops.c	Wed Sep  7 16:50:27 2005
@@ -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:
     {
diff -r e991ec23c318 -r 4aac20cac3df xen/include/xen/trace.h
--- a/xen/include/xen/trace.h	Wed Sep  7 12:49:52 2005
+++ b/xen/include/xen/trace.h	Wed Sep  7 16:50:27 2005
@@ -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__ */

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-09-07 16:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-06 22:51 trace default? Rob Gardner
2005-09-07  9:48 ` Keir Fraser
2005-09-07 15:45   ` Rob Gardner
2005-09-07 16:00     ` Mark Williamson
2005-09-07 16:54       ` [PATCH] " Mark Williamson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.