]> xenbits.xensource.com Git - xen.git/commitdiff
xen/debug: make debugtrace configurable via Kconfig
authorJuergen Gross <jgross@suse.com>
Mon, 18 Mar 2019 10:39:43 +0000 (11:39 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 18 Mar 2019 10:39:43 +0000 (11:39 +0100)
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@suse.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/Kconfig.debug
xen/drivers/char/console.c
xen/include/xen/lib.h

index 4d5d7f87cbc9be7fe42a3d812315d0718740e0bd..daacf85141a916b74df67b58aa37f419fff7a157 100644 (file)
@@ -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
index 4315588f0597a6ab0180323235eed4ffc7ecaf63..41ec13ce52f2da285240762ac52055ed51ded785 100644 (file)
@@ -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;
index 89939f43c8dd542de0969392971dc95a68dc1ef7..e0b7bcb6b7576da7751c32bf863988db37957c1e 100644 (file)
@@ -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)));