You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by David Reid <da...@jetnet.co.uk> on 2000/06/20 00:08:41 UTC

Setting POOL_DEBUG and friends...

Well I've found a few minutes to think about this, and I can't some up 
with a clean way to do it.  Anyway, there are a few options below, in no 
order other than that in which I thought of them.  Other options might 
be better/easier but these are the ones I have at present.

1. include apr_general.h to the modules that need ap_join_pool and thus 
be able to wrap the calls in #ifdef POLL_DEBUG which we're defining in 
apr_general.h.  this seems to break the intent of keeping APR headers 
isolated.

2.  add a configure option, --enable-pool-debug and so on, which are 
then passed into APR.  This has the advantage that we can use the 
information to set a flag in apache that says that ap_pool_join should 
be called and correctly set the flags in APR to make it do something.

3.  we can just make the call anyway and use the existing #define method 
to no-op it.  This is by far the easiest and so far gets my vote, but 
I'd rather not have code being called that is only there for debugging 
if we're not debugging.

Anyway, thoughts?

I'm in Verona tomorrow night so I won't do anything until Wed night at 
the earliest.

david

"I never get involved in my own life, it's way
too complicated."


Re: Setting POOL_DEBUG and friends...

Posted by David Reid <dr...@jetnet.co.uk>.
> > 1. include apr_general.h to the modules that need ap_join_pool and thus
> > be able to wrap the calls in #ifdef POLL_DEBUG which we're defining in
> > apr_general.h.  this seems to break the intent of keeping APR headers
> > isolated.
>
> the config system is incomplete if there's no easy way to add -D defines
> when configuring the server.
>

This looks like being the best option.  The flag will be available to both
Apache and APR so no problem there and it doesn't require editing any header
files...

david


Re: Setting POOL_DEBUG and friends...

Posted by rb...@covalent.net.
> could whoever fixes this also fix this:
> 
> env USE_MAINTAINER_MODE=yes ./configure --with-debug
> 
> there shouldn't be two distinct ways to configure debugging support. (and
> update the README.BUILD_ALPHA and README.MPM, thanks.)

There aren't two ways to do this anymore.  The correct way to setup
debugging is with --with-maintainer-mode.  APR and Apache both use this
option now.  I believe there are two different debugging modes,
--with-maintainer-mode and --with-debug.  They set different CFLAGS.

Ryan 

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: Setting POOL_DEBUG and friends...

Posted by dean gaudet <dg...@arctic.org>.
On Mon, 19 Jun 2000, David Reid wrote:

> Well I've found a few minutes to think about this, and I can't some up 
> with a clean way to do it.  Anyway, there are a few options below, in no 
> order other than that in which I thought of them.  Other options might 
> be better/easier but these are the ones I have at present.
> 
> 1. include apr_general.h to the modules that need ap_join_pool and thus 
> be able to wrap the calls in #ifdef POLL_DEBUG which we're defining in 
> apr_general.h.  this seems to break the intent of keeping APR headers 
> isolated.

the config system is incomplete if there's no easy way to add -D defines
when configuring the server.

> 2.  add a configure option, --enable-pool-debug and so on, which are 
> then passed into APR.  This has the advantage that we can use the 
> information to set a flag in apache that says that ap_pool_join should 
> be called and correctly set the flags in APR to make it do something.

-1.  what happens when the next FOO_DEBUG comes along?  you have to go
tweak the config system again?

in 1.3 it was as easy as adding -DFOO_DEBUG to EXTRA_CFLAGS.

> 3.  we can just make the call anyway and use the existing #define method 
> to no-op it.  This is by far the easiest and so far gets my vote, but 
> I'd rather not have code being called that is only there for debugging 
> if we're not debugging.

-1.  the bug is in the config system -- it should allow arbitrary CFLAGS
to be added easily.

could whoever fixes this also fix this:

env USE_MAINTAINER_MODE=yes ./configure --with-debug

there shouldn't be two distinct ways to configure debugging support. (and
update the README.BUILD_ALPHA and README.MPM, thanks.)

-dean