[m-rev.] for review: automatic test to enable deep profiling

Peter Ross peter.ross at miscrit.be
Wed Jun 6 07:30:33 AEST 2001


On Wed, Jun 06, 2001 at 05:59:26AM +1000, Fergus Henderson wrote:
> On 05-Jun-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> > +++ configure.in	2001/06/05 15:32:22
> > @@ -2109,12 +2109,16 @@
> >  #
> >  # Add an option that disables the deep profiler.
> >  #
> > -AC_ARG_ENABLE(deep-profiler,
> > -    [  --enable-deep-profiler  enable the deep profiler],
> > -	mercury_cv_enable_deep_profiler="$enableval",
> > -	mercury_cv_enable_deep_profiler=no
> > -)
> >  AC_MSG_CHECKING(whether to enable the deep profiler)
> > +
> > +    # This test may need to be made more specific at a later date.  For
> > +    # moment it is sufficient to distinguish between win32 and unix systems.
> > +if test "$HAVE_UNISTD_H" = 1; then
> > +    mercury_cv_enable_deep_profiler=yes
> > +else
> > +    mercury_cv_enable_deep_profiler=no
> > +fi
> 
> The code here is fine, but the comment is not.
> 
> For deep profiling, we want to distinguish not between win32 and unix,
> but between Posix systems and non-Posix systems (i.e. between systems
> which support the relevent Posix standards and systems don't support
> those standards).
> 
> Pete, after all the trouble you've had with portability,
> e.g. having to fix these problems with deep profiling,
> I wish you would learn to think about this a bit more abstractly.
> The reason the comment worries me is not so much because it would
> in and of itself be terribly misleading, but more because of what
> it reveals about your thought processes ;-)
> 
> The idea should not be to distinguish between win32 and unix systems.
> That approach never works in the long run, because someone always comes
> up with a different system that is neither win32 nor unix, or which is
> *both* win32 and unix.  So please remember this idea: always test for
> feature sets, not for particular implementations.
> 
I understand what you mean.  What I was trying to say was that this test
doesn't test all the relevant feature set necessary for implementing
deep profiling.  As far as I know it only distinguishes between
compliant unix (I should have said posix) systems and win32 as that is
all I have tested it on.  I can imagine some other system which does
have a unistd.h but upon which deep profiling still doesn't work, and
for which the test should be extended.

Hope that makes sense.

Pete
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list