If we're building debug, show more guest information
PATCH 1/1 If we're building debug, show more guest information
# HG changeset patch
# User [email protected]
# Date 1171033428 28800
# Node ID 4708ec13626af36ce5440daa627149cb35e68fd2 # Parent e26e9fcc0e6e4cc0e8a3330611be984c17985743 If we're building debug, show more guest information.
xen/drivers/char/console.c +5 -1
@@ -67,14 +67,18 @@ static DEFINE_SPINLOCK(console_lock);* * L < lower_threshold : always logged * lower_threshold <= L < upper_threshold : rate-limited logging -* upper_threshold <= L : never logged +* upper_threshold < L : never logged * * Note, in the above algorithm, to disable rate limiting simply make * the lower threshold equal to the upper. */ #define XENLOG_UPPER_THRESHOLD 2/* Do not print INFO and DEBUG */ #define XENLOG_LOWER_THRESHOLD 2/* Always print ERR and WARNING */ +#ifdef NDEBUG #define XENLOG_GUEST_UPPER_THRESHOLD 2/* Do not print INFO and DEBUG */ +#else +#define XENLOG_GUEST_UPPER_THRESHOLD 3/* Do not print DEBUG */ +#endif #define XENLOG_GUEST_LOWER_THRESHOLD 0/* Rate-limit ERR and WARNING */ /* * The XENLOG_DEFAULT is the default given to printks that
It's really not that hard to add loglvl=all guest_loglvl=all (or similar) to your boot command line when you want it (e.g., dev&test environments).
K.
Quoted 37 lines · On 9/2/07 2:04 pm, "[email protected]" <[email protected]> wrote:
# HG changeset patch
# User [email protected]
# Date 1171033428 28800
# Node ID4708ec13626af36ce5440daa627149cb35e68fd2# Parente26e9fcc0e6e4cc0e8a3330611be984c17985743If we're building debug, show more guest information.Signed-off-by John Levon <[email protected]>xen/drivers/char/console.c +5
-1@@ -67,14 +67,18 @@ static DEFINE_SPINLOCK(console_lock);* * L < lower_threshold : always logged * lower_threshold <= L < upper_threshold : rate-limited logging -* upper_threshold <= L : never logged +* upper_threshold < L : never logged * * Note, in the above algorithm, to disable rate limiting simply make * the lower threshold equal to the upper. */ #define XENLOG_UPPER_THRESHOLD 2/* Do not print INFO and DEBUG */ #define XENLOG_LOWER_THRESHOLD 2/* Always print ERR and WARNING */ +#ifdef NDEBUG #define XENLOG_GUEST_UPPER_THRESHOLD 2/* Do not print INFO and DEBUG */ +#else +#define XENLOG_GUEST_UPPER_THRESHOLD 3/* Do not print DEBUG */ +#endif #define XENLOG_GUEST_LOWER_THRESHOLD 0/* Rate-limit ERR and WARNING */ /* * The XENLOG_DEFAULT is the default given to printks that _______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 2 lines · Keir Fraser
It's really not that hard to add loglvl=all guest_loglvl=all (or similar) to your boot command line when you want it (e.g., dev&test environments).
It's hard enough when people don't even know it exists. The whole point of a debug build is to debug things, and we've already had a lurking bug because it wasn't turned on. In particular this was the decrease_reservation warning that's threatened to become guest-visible in its comment.
regards,
john
RE: [PATCH] If we're building debug, show more guestinformation
In reply to Keir FraserQuoted 1 line
It's really not that hard to add loglvl=all guest_loglvl=all (or
similar)
Quoted 1 line
to your boot command line when you want it (e.g., dev&test
environments).
I agree with John that changing the default is handy.
Ian
Quoted 13 lines
K.
Quoted 9 lines · On 9/2/07 2:04 pm, "[email protected]" <[email protected]> wrote:
# HG changeset patch
# User [email protected]
# Date 1171033428 28800
# Node ID4708ec13626af36ce5440daa627149cb35e68fd2# Parente26e9fcc0e6e4cc0e8a3330611be984c17985743If we're building debug, show more guest information.Signed-off-by John Levon <[email protected]>
Quoted 11 lines
xen/drivers/char/console.c static DEFINE_SPINLOCK(console_lock); · line 72
Quoted 11 lines
xen/drivers/char/console.c +1
-1@@ -67,14 +67,18 @@ static DEFINE_SPINLOCK(console_lock);* * L < lower_threshold : always logged * lower_threshold <= L < upper_threshold : rate-limited logging -* upper_threshold <= L : never logged +* upper_threshold < L : never logged * * Note, in the above algorithm, to disable rate limiting simply
make
Quoted 3 lines
xen/drivers/char/console.c static DEFINE_SPINLOCK(console_lock);
Quoted 3 lines
xen/drivers/char/console.c +0
-0* the lower threshold equal to the upper. */ #define XENLOG_UPPER_THRESHOLD 2/* Do not print INFO and
DEBUG
Quoted 2 lines
*/
Quoted 1 line
xen/drivers/char/console.c +0
-0#define XENLOG_LOWER_THRESHOLD 2/* Always print ERR and
WARNING
Quoted 3 lines
*/
Quoted 2 lines
xen/drivers/char/console.c +1
-0+#ifdef NDEBUG #define XENLOG_GUEST_UPPER_THRESHOLD 2/* Do not print INFO and
DEBUG
Quoted 5 lines
*/
xen/drivers/char/console.c static DEFINE_SPINLOCK(console_lock);
Quoted 4 lines
xen/drivers/char/console.c +3
-0+#else +#define XENLOG_GUEST_UPPER_THRESHOLD 3/* Do not print DEBUG */ +#endif #define XENLOG_GUEST_LOWER_THRESHOLD 0/* Rate-limit ERR and
WARNING
Quoted 15 lines
*/
Quoted 7 lines
xen/drivers/char/console.c +0
-0/* * The XENLOG_DEFAULT is the default given to printks that _______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel