apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: Passing file/line ALL the time
Date Mon, 14 Jan 2002 00:03:59 GMT
On Sun, Jan 13, 2002 at 07:36:49PM +0100, Sander Striker wrote:
> > From: Ian Holsman [mailto:ianh@apache.org]
> > 
> > Stupid Question Time:
> > is there a problem just enabling file/line passing to this ALL the time?
> > I mean.. it's just a extra parameter on the stack.
> > 
> > this would make it MUCH easier to enable/disable debugging.
> 
> Although it would make things easier to enable debugging, for
> normal operation of an apr using application it is not needed.
> 
> I don't feel the current hurdle one has to take to do memory
> debugging is too high.
> 
> I'm -1 on doing file/line passing by default.  It is a debugging
> tool/feature and it should stay that.

-1

We are not in the habit of keeping debug code in production applications.
Consider two things:

1) how many times we call pool functions, and what that "just a extra
   parameter on the stack" means.
   [ granted: measurement would need to happen here, but it is overhead that
     productions apps just don't need ]

2) BAD BAD: now that we have the file/line in *one* string, stop and think
   about how many separate strings are being created and linked into the
   application. That is wholly unacceptable.

Turning on pool debugging is a matter of recompiling one file. Yes, the data
coming into the pool functions all say "<undefined>", but as you need more
data, you can recompile portions.

But we cannot and will not leave that stuff enabled all the time.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message