All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] If we're building debug, show more guest information
@ 2007-02-09 14:04 john.levon
  2007-02-09 16:19 ` Keir Fraser
  0 siblings, 1 reply; 4+ messages in thread
From: john.levon @ 2007-02-09 14:04 UTC (permalink / raw)
  To: xen-devel

# HG changeset patch
# User john.levon@sun.com
# Date 1171033428 28800
# Node ID 4708ec13626af36ce5440daa627149cb35e68fd2
# Parent  e26e9fcc0e6e4cc0e8a3330611be984c17985743
If we're building debug, show more guest information.

Signed-off-by: John Levon <john.levon@sun.com>

diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] If we're building debug, show more guest information
  2007-02-09 14:04 [PATCH] If we're building debug, show more guest information john.levon
@ 2007-02-09 16:19 ` Keir Fraser
  2007-02-09 16:27   ` John Levon
  2007-02-09 17:30   ` [PATCH] If we're building debug, show more guestinformation Ian Pratt
  0 siblings, 2 replies; 4+ messages in thread
From: Keir Fraser @ 2007-02-09 16:19 UTC (permalink / raw)
  To: john.levon, xen-devel

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.

On 9/2/07 2:04 pm, "john.levon@sun.com" <john.levon@sun.com> wrote:

> # HG changeset patch
> # User john.levon@sun.com
> # Date 1171033428 28800
> # Node ID 4708ec13626af36ce5440daa627149cb35e68fd2
> # Parent  e26e9fcc0e6e4cc0e8a3330611be984c17985743
> If we're building debug, show more guest information.
> 
> Signed-off-by: John Levon <john.levon@sun.com>
> 
> diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
> --- a/xen/drivers/char/console.c
> +++ b/xen/drivers/char/console.c
> @@ -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
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] If we're building debug, show more guest information
  2007-02-09 16:19 ` Keir Fraser
@ 2007-02-09 16:27   ` John Levon
  2007-02-09 17:30   ` [PATCH] If we're building debug, show more guestinformation Ian Pratt
  1 sibling, 0 replies; 4+ messages in thread
From: John Levon @ 2007-02-09 16:27 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel, john.levon

On Fri, Feb 09, 2007 at 04:19:03PM +0000, Keir Fraser wrote:

> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] If we're building debug, show more guestinformation
  2007-02-09 16:19 ` Keir Fraser
  2007-02-09 16:27   ` John Levon
@ 2007-02-09 17:30   ` Ian Pratt
  1 sibling, 0 replies; 4+ messages in thread
From: Ian Pratt @ 2007-02-09 17:30 UTC (permalink / raw)
  To: Keir Fraser, john.levon, xen-devel

> 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).

I agree with John that changing the default is handy.

Ian

 
>  K.
> 
> On 9/2/07 2:04 pm, "john.levon@sun.com" <john.levon@sun.com> wrote:
> 
> > # HG changeset patch
> > # User john.levon@sun.com
> > # Date 1171033428 28800
> > # Node ID 4708ec13626af36ce5440daa627149cb35e68fd2
> > # Parent  e26e9fcc0e6e4cc0e8a3330611be984c17985743
> > If we're building debug, show more guest information.
> >
> > Signed-off-by: John Levon <john.levon@sun.com>
> >
> > diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
> > --- a/xen/drivers/char/console.c
> > +++ b/xen/drivers/char/console.c
> > @@ -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
> > Xen-devel@lists.xensource.com
> > http://lists.xensource.com/xen-devel
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-02-09 17:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-09 14:04 [PATCH] If we're building debug, show more guest information john.levon
2007-02-09 16:19 ` Keir Fraser
2007-02-09 16:27   ` John Levon
2007-02-09 17:30   ` [PATCH] If we're building debug, show more guestinformation Ian Pratt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.