All of lore.kernel.org
 help / color / mirror / Atom feed
* dprintk() and gdprintk() to be compiled out when NDEBUG
@ 2015-02-11  7:50 Jan Beulich
  2015-02-11 10:05 ` Andrew Cooper
  2015-02-18 10:58 ` Ian Campbell
  0 siblings, 2 replies; 7+ messages in thread
From: Jan Beulich @ 2015-02-11  7:50 UTC (permalink / raw)
  To: xen-devel

All,

I'd like to propose to honor the 'd' in these functions' names (which
I understand to mean "debug") in that such functions should be
no-ops in non-debug builds. I'd then be inclined to introduce a
gprintk() automatically adding XENLOG_GUEST and the printing of
current using the %pv format. Quite likely the (mis-)use of these
two functions may then temporarily result in messages not meant
to be debugging ones to become hidden in non-debug builds. If
others agree, I'd try to make one pass through the tree to try to
identify such, but I'd like to ask others to also keep an eye on that
aspect.

Jan

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

* Re: dprintk() and gdprintk() to be compiled out when NDEBUG
  2015-02-11  7:50 dprintk() and gdprintk() to be compiled out when NDEBUG Jan Beulich
@ 2015-02-11 10:05 ` Andrew Cooper
  2015-02-11 10:32   ` Jan Beulich
  2015-02-18 10:58 ` Ian Campbell
  1 sibling, 1 reply; 7+ messages in thread
From: Andrew Cooper @ 2015-02-11 10:05 UTC (permalink / raw)
  To: Jan Beulich, xen-devel

On 11/02/15 07:50, Jan Beulich wrote:
> All,
>
> I'd like to propose to honor the 'd' in these functions' names (which
> I understand to mean "debug") in that such functions should be
> no-ops in non-debug builds. I'd then be inclined to introduce a
> gprintk() automatically adding XENLOG_GUEST and the printing of
> current using the %pv format. Quite likely the (mis-)use of these
> two functions may then temporarily result in messages not meant
> to be debugging ones to become hidden in non-debug builds. If
> others agree, I'd try to make one pass through the tree to try to
> identify such, but I'd like to ask others to also keep an eye on that
> aspect.

I agree.  I suspect many of the existing gdprintk()s will need to turn
into dprintk()s.

~Andrew

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

* Re: dprintk() and gdprintk() to be compiled out when NDEBUG
  2015-02-11 10:05 ` Andrew Cooper
@ 2015-02-11 10:32   ` Jan Beulich
  2015-02-11 10:34     ` Andrew Cooper
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Beulich @ 2015-02-11 10:32 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: xen-devel

>>> On 11.02.15 at 11:05, <andrew.cooper3@citrix.com> wrote:
> On 11/02/15 07:50, Jan Beulich wrote:
>> I'd like to propose to honor the 'd' in these functions' names (which
>> I understand to mean "debug") in that such functions should be
>> no-ops in non-debug builds. I'd then be inclined to introduce a
>> gprintk() automatically adding XENLOG_GUEST and the printing of
>> current using the %pv format. Quite likely the (mis-)use of these
>> two functions may then temporarily result in messages not meant
>> to be debugging ones to become hidden in non-debug builds. If
>> others agree, I'd try to make one pass through the tree to try to
>> identify such, but I'd like to ask others to also keep an eye on that
>> aspect.
> 
> I agree.  I suspect many of the existing gdprintk()s will need to turn
> into dprintk()s.

Maybe, but that's yet another topic (unless you meant gprintk()s
instead of dprintk()s).

Jan

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

* Re: dprintk() and gdprintk() to be compiled out when NDEBUG
  2015-02-11 10:32   ` Jan Beulich
@ 2015-02-11 10:34     ` Andrew Cooper
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Cooper @ 2015-02-11 10:34 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel

On 11/02/15 10:32, Jan Beulich wrote:
>>>> On 11.02.15 at 11:05, <andrew.cooper3@citrix.com> wrote:
>> On 11/02/15 07:50, Jan Beulich wrote:
>>> I'd like to propose to honor the 'd' in these functions' names (which
>>> I understand to mean "debug") in that such functions should be
>>> no-ops in non-debug builds. I'd then be inclined to introduce a
>>> gprintk() automatically adding XENLOG_GUEST and the printing of
>>> current using the %pv format. Quite likely the (mis-)use of these
>>> two functions may then temporarily result in messages not meant
>>> to be debugging ones to become hidden in non-debug builds. If
>>> others agree, I'd try to make one pass through the tree to try to
>>> identify such, but I'd like to ask others to also keep an eye on that
>>> aspect.
>> I agree.  I suspect many of the existing gdprintk()s will need to turn
>> into dprintk()s.
> Maybe, but that's yet another topic (unless you meant gprintk()s
> instead of dprintk()s).

I did mean gprintk().  Sorry.

~Andrew

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

* Re: dprintk() and gdprintk() to be compiled out when NDEBUG
  2015-02-11  7:50 dprintk() and gdprintk() to be compiled out when NDEBUG Jan Beulich
  2015-02-11 10:05 ` Andrew Cooper
@ 2015-02-18 10:58 ` Ian Campbell
  2015-02-18 11:05   ` Jan Beulich
  1 sibling, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2015-02-18 10:58 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel

On Wed, 2015-02-11 at 07:50 +0000, Jan Beulich wrote:
> All,
> 
> I'd like to propose to honor the 'd' in these functions' names (which
> I understand to mean "debug") in that such functions should be
> no-ops in non-debug builds. I'd then be inclined to introduce a
> gprintk() automatically adding XENLOG_GUEST and the printing of
> current using the %pv format.

Sounds fine to me.

>  Quite likely the (mis-)use of these
> two functions may then temporarily result in messages not meant
> to be debugging ones to become hidden in non-debug builds. If
> others agree, I'd try to make one pass through the tree to try to
> identify such,

Thanks, that would be useful I think. Will you cover arch/arm too?

> but I'd like to ask others to also keep an eye on that aspect.

I'll certainly try.

Ian.

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

* Re: dprintk() and gdprintk() to be compiled out when NDEBUG
  2015-02-18 10:58 ` Ian Campbell
@ 2015-02-18 11:05   ` Jan Beulich
  2015-02-18 11:40     ` Ian Campbell
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Beulich @ 2015-02-18 11:05 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

>>> On 18.02.15 at 11:58, <Ian.Campbell@citrix.com> wrote:
> On Wed, 2015-02-11 at 07:50 +0000, Jan Beulich wrote:
>>  Quite likely the (mis-)use of these
>> two functions may then temporarily result in messages not meant
>> to be debugging ones to become hidden in non-debug builds. If
>> others agree, I'd try to make one pass through the tree to try to
>> identify such,
> 
> Thanks, that would be useful I think. Will you cover arch/arm too?

I did the patch and the auditing pass already, and I skipped - as
you kind of expected - arch/arm. Since we're not under pressure
and everyone should be doing debug builds right now anyway, I
don't think applying the to-be-posted patch without ARM
adjustments will do much harm; let me know if you think otherwise.

Jan

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

* Re: dprintk() and gdprintk() to be compiled out when NDEBUG
  2015-02-18 11:05   ` Jan Beulich
@ 2015-02-18 11:40     ` Ian Campbell
  0 siblings, 0 replies; 7+ messages in thread
From: Ian Campbell @ 2015-02-18 11:40 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel

On Wed, 2015-02-18 at 11:05 +0000, Jan Beulich wrote:
> >>> On 18.02.15 at 11:58, <Ian.Campbell@citrix.com> wrote:
> > On Wed, 2015-02-11 at 07:50 +0000, Jan Beulich wrote:
> >>  Quite likely the (mis-)use of these
> >> two functions may then temporarily result in messages not meant
> >> to be debugging ones to become hidden in non-debug builds. If
> >> others agree, I'd try to make one pass through the tree to try to
> >> identify such,
> > 
> > Thanks, that would be useful I think. Will you cover arch/arm too?
> 
> I did the patch and the auditing pass already, and I skipped - as
> you kind of expected - arch/arm. Since we're not under pressure
> and everyone should be doing debug builds right now anyway, I
> don't think applying the to-be-posted patch without ARM
> adjustments will do much harm; let me know if you think otherwise.

No problem, please go ahead and I'll try and find a moment to audit the
ARM ones separately.

Ian.

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

end of thread, other threads:[~2015-02-18 11:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-11  7:50 dprintk() and gdprintk() to be compiled out when NDEBUG Jan Beulich
2015-02-11 10:05 ` Andrew Cooper
2015-02-11 10:32   ` Jan Beulich
2015-02-11 10:34     ` Andrew Cooper
2015-02-18 10:58 ` Ian Campbell
2015-02-18 11:05   ` Jan Beulich
2015-02-18 11:40     ` Ian Campbell

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.