You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by rb...@covalent.net on 2000/12/01 18:52:06 UTC

Re: cvs commit: apache-2.0/src/modules/mpm/prefork prefork.c

On 1 Dec 2000 trawick@locus.apache.org wrote:

> trawick     00/12/01 09:41:28
> 
>   Modified:    src/modules/mpm/prefork prefork.c
>   Log:
>   If apr_lock() or apr_unlock() fail, write a log message before bailing
>   out.

Woah.  You just took a debug only check, and turned it into a run-time
check that happens every time.  I'm not saying this is bad, but it should
be noted in the log.  :-)

+1 for the change, just wanted a clearer log message someplace.

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


Re: cvs commit: apache-2.0/src/modules/mpm/prefork prefork.c

Posted by rb...@covalent.net.
> >From the doc in include/httpd.h (yes, the doc is correct):
> 
> /* 
>  * Redefine assert() to something more useful for an Apache...
>  *
>  * Use ap_assert() if the condition should always be checked.
>  * Use AP_DEBUG_ASSERT() if the condition should only be checked when AP_DEBUG
>  * is defined.
>  */
> 
> Take care now,

Okay, sorry.  I saw assert and assumed it was debug only, because that is
what assert usually means.  It would be cool if we changed the name of
this IMHO.

Sorry about the confusion, my fault.

Ryan

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


Re: cvs commit: apache-2.0/src/modules/mpm/prefork prefork.c

Posted by Jeff Trawick <tr...@bellsouth.net>.
rbb@covalent.net writes:

> But, ap_assert is only used when this is built in debug mode.  So, this
> does have small implications when built for release mode. As I said, this
> is not a big issue, but I thought it should be mentioned.

Would it be rude for me to suggest a caffeine infusion?

>From the doc in include/httpd.h (yes, the doc is correct):

/* 
 * Redefine assert() to something more useful for an Apache...
 *
 * Use ap_assert() if the condition should always be checked.
 * Use AP_DEBUG_ASSERT() if the condition should only be checked when AP_DEBUG
 * is defined.
 */

Take care now,

-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Re: cvs commit: apache-2.0/src/modules/mpm/prefork prefork.c

Posted by rb...@covalent.net.
On 1 Dec 2000, Jeff Trawick wrote:

> rbb@covalent.net writes:
> 
> > >   If apr_lock() or apr_unlock() fail, write a log message before bailing
> > >   out.
> > 
> > Woah.  You just took a debug only check, and turned it into a run-time
> > check that happens every time.  I'm not saying this is bad, but it should
> > be noted in the log.  :-)
> 
> ap_assert() is a run-time check...  I don't see the performance
> change (okay, our code is a tiny bit bigger which hurts cache/VM)

But, ap_assert is only used when this is built in debug mode.  So, this
does have small implications when built for release mode. As I said, this
is not a big issue, but I thought it should be mentioned.

Ryan

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


Re: cvs commit: apache-2.0/src/modules/mpm/prefork prefork.c

Posted by Jeff Trawick <tr...@bellsouth.net>.
rbb@covalent.net writes:

> >   If apr_lock() or apr_unlock() fail, write a log message before bailing
> >   out.
> 
> Woah.  You just took a debug only check, and turned it into a run-time
> check that happens every time.  I'm not saying this is bad, but it should
> be noted in the log.  :-)

ap_assert() is a run-time check...  I don't see the performance
change (okay, our code is a tiny bit bigger which hurts cache/VM)

-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...