develooper Front page | perl.perl6.internals | Postings from October 2002

Help! Bugs! Crawling all over!

Thread Next
From:
Steve Fink
Date:
October 21, 2002 01:53
Subject:
Help! Bugs! Crawling all over!
Message ID:
20021021085217.GH2030@foxglove.digital-integrity.com
I haven't been applying many patches recently, partly because I
haven't had much time available, and partly because there are
gc-related bugs lurking in the code that I regard as higher priority.
I tried tracking them down, but somewhere in the middle I realized
that I really ought to be trying to put together a 0.0.9 release
instead.

So, I just checked in something that breaks 'make test' for everyone:
GC_DEBUG is now on by default for tests. (But _only_ for tests -- the
parrot executable still has it off by default.) I reworked it so that
it is a property of the interpreter and can be enabled and disabled at
runtime via the --gc-debug flag to parrot, or by setting the
$PARROT_GC_DEBUG environment variable. In fact, it should be possible
to toggle it in the middle of a run, but I haven't tried it -- it
changes the parameters to the memory management system, so turning it
on halfway through a program might do strange stuff.

This slows parrot down by about 7% when debugging is turned off (on my
machine, for lifetest). So there is also a DISABLE_GC_DEBUG #define in
include/parrot/parrot.h that may be turned on for optimized builds.
For a -O3 compile on my system, I get a 1% slowdown over the previous
CVS version when running without the jit, and a 1% speedup when
running with the jit. Or, in other words, no measurable overhead.
(Which is unsurprising; it just means I didn't break anything.)

I currently get three test failures when running with GC_DEBUG on, but
not always the same three (depending on how I muck with unrelated
parts of the code.)

The slowdown when GC_DEBUG is turned on is... more than 7%. It isn't
too bad for most of the tests or mopstest, but for lifetest I get a
factor of 140x slowdown. Heh. It also turned out to be too annoyingly
slow for t/op/stacks.t test #7 and t/pmc/intlist.t tests #3 and #4. I
don't want to make the tests too onerous to run, so I put in a
not-so-pretty hack to disable GC_DEBUG for just those three tests,
when running under 'make test' or a variant. It's documented in the
makefile and in those tests.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About