[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v2 1/2] xen/debug: make debugtrace configurable via Kconfig



Instead of having to edit include/xen/lib.h for making debugtrace
available make it configurable via Kconfig.

Default is off, it is available only in expert mode or in debug builds.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/Kconfig.debug          | 7 +++++++
 xen/drivers/char/console.c | 2 +-
 xen/include/xen/lib.h      | 3 +--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug
index 4d5d7f87cb..daacf85141 100644
--- a/xen/Kconfig.debug
+++ b/xen/Kconfig.debug
@@ -98,6 +98,13 @@ config UBSAN
 
          If unsure, say N here.
 
+config DEBUG_TRACE
+       bool "Debug trace support"
+       ---help---
+         Debug trace enables to record debug trace messages which are printed
+         either directly to the console or are printed to console in case of
+         a system crash.
+
 endif # DEBUG || EXPERT
 
 endmenu
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 4315588f05..41ec13ce52 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -1157,7 +1157,7 @@ int printk_ratelimit(void)
  * **************************************************************
  */
 
-#ifdef DEBUG_TRACE_DUMP
+#ifdef CONFIG_DEBUG_TRACE
 
 /* Send output direct to console, or buffer it? */
 static volatile int debugtrace_send_to_console;
diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h
index 89939f43c8..e0b7bcb6b7 100644
--- a/xen/include/xen/lib.h
+++ b/xen/include/xen/lib.h
@@ -86,8 +86,7 @@ int parse_boolean(const char *name, const char *s, const char 
*e);
  */
 int cmdline_strcmp(const char *frag, const char *name);
 
-/*#define DEBUG_TRACE_DUMP*/
-#ifdef DEBUG_TRACE_DUMP
+#ifdef CONFIG_DEBUG_TRACE
 extern void debugtrace_dump(void);
 extern void debugtrace_printk(const char *fmt, ...)
     __attribute__ ((format (printf, 1, 2)));
-- 
2.16.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.