diff -NurpP --minimal linux-2.6.11.10-vs2.0.2/include/linux/vserver/debug.h linux-2.6.11.10-vs2.0.3/include/linux/vserver/debug.h --- linux-2.6.11.10-vs2.0.2/include/linux/vserver/debug.h 2005-05-25 10:02:46 +0200 +++ linux-2.6.11.10-vs2.0.3/include/linux/vserver/debug.h 2005-06-17 08:02:58 +0200 @@ -25,25 +25,51 @@ extern unsigned int vx_debug_net; extern unsigned int vx_debug_limit; extern unsigned int vx_debug_dlim; extern unsigned int vx_debug_cvirt; + + +#include +#define __LOCATION__ __FILE__ ":" __stringify(__LINE__) + +#ifdef CONFIG_VSERVER_DEBUG_INFO +#define __vxd_info(t,c,f,x) \ + asm( ".section .vxdebug \n" \ + ".ascii \"" __LOCATION__ "\" \n" \ + ".byte 0x01 \n" \ + ".ascii " #t " \n" \ + ".byte 0x01 \n" \ + ".ascii " #c " \n" \ + ".byte 0x01 \n" \ + ".ascii " #f " \n" \ + ".byte 0x01 \n" \ + ".ascii " #x " \n" \ + ".byte 0x02 \n" \ + ".previous \n" \ + ) +#else +#define __vxd_info(t,c,f,x) +#endif #define VX_LOGLEVEL "vxD: " #define VX_WARNLEVEL KERN_WARNING "vxW: " #define vxdprintk(c,f,x...) \ do { \ + __vxd_info("d",#c,f, #x); \ if (c) \ printk(VX_LOGLEVEL f "\n" , ##x); \ } while (0) #define vxlprintk(c,f,x...) \ do { \ + __vxd_info("l",#c,f, #x); \ if (c) \ printk(VX_LOGLEVEL f " @%s:%d\n", x); \ } while (0) #define vxfprintk(c,f,x...) \ do { \ + __vxd_info("f",#c,f, #x); \ if (c) \ printk(VX_LOGLEVEL f " %s@%s:%d\n", x); \ } while (0) @@ -51,6 +78,7 @@ extern unsigned int vx_debug_cvirt; #define vxwprintk(c,f,x...) \ do { \ + __vxd_info("w",#c,f, #x); \ if (c) \ printk(VX_WARNLEVEL f "\n" , ##x); \ } while (0) diff -NurpP --minimal linux-2.6.11.10-vs2.0.2/kernel/vserver/Kconfig linux-2.6.11.10-vs2.0.3/kernel/vserver/Kconfig --- linux-2.6.11.10-vs2.0.2/kernel/vserver/Kconfig 2005-05-22 06:58:25 +0200 +++ linux-2.6.11.10-vs2.0.3/kernel/vserver/Kconfig 2005-06-17 07:55:06 +0200 @@ -123,6 +124,15 @@ config VSERVER_DEBUG overhead (~ ??%) to all vserver related functions and increases the kernel size by about 20k. +config VSERVER_DEBUG_INFO + bool "VServer Debug Information" + depends on VSERVER_DEBUG + default n + help + If this is enabled, the kernel will contain an extra + section listing all the debug messages for external + processing. + config VSERVER_HISTORY bool "VServer History Tracing" depends on VSERVER_DEBUG