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

Re: [Xen-devel] [PATCH 2/4] dbg_rw_guest_mem: Enable debug log output



On Sat,  4 Jan 2014 12:52:14 -0500
Don Slutz <dslutz@xxxxxxxxxxx> wrote:

> This also fixes the old debug output to compile and work if DBGP1
> and DBGP2 are defined like DBGP3.
> 
> Signed-off-by: Don Slutz <dslutz@xxxxxxxxxxx>
> ---
>  xen/arch/x86/debug.c | 41 +++++++++++++++++++++++++++++++----------
>  1 file changed, 31 insertions(+), 10 deletions(-)
> 
> diff --git a/xen/arch/x86/debug.c b/xen/arch/x86/debug.c
> index eceb805..2e0a05a 100644
> --- a/xen/arch/x86/debug.c
> +++ b/xen/arch/x86/debug.c
> @@ -41,6 +41,12 @@
>  #define DBGP2(...) ((void)0)
>  #endif
>  
> +#ifdef XEN_GDBSX_DEBUG3
> +#define DBGP3(...) gdprintk(XENLOG_DEBUG, __VA_ARGS__)
> +#else
> +#define DBGP3(...) ((void)0)
> +#endif
> +

Umm... some hostorical perspective... this file is shared by both
gdbsx, and kdb, and possibly any future debug type tools. While gdbsx
got merged, kdb did not. So how about, just define say dbg_debug to replace
kdbdbg, (please don't call it "debug" - I hate using words that grep 
million results), and then just change DBGP*. Also looks like DBGP is 
not used anywhere, so we only need two... 

static volatile int dbg_debug;
#define DBGP(...) {(dbg_debug) ? printk(__VA_ARGS__) : 0;}
#define DBGP1(...) {(dbg_debug > 1) ? printk(__VA_ARGS__) : 0;}

This allows us to not need XEN_GDBSX_DEBUG3, and also the debug
can be enabled dynamically without recompile (in my case, via kdb).

thanks,
mukesh


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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