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

Re: GC performance

Thread Previous | Thread Next
From:
Bryan C. Warnock
Date:
February 28, 2002 05:35
Subject:
Re: GC performance
Message ID:
200202281332.g1SDW5Q22972@smtp.capita.com
On Thursday 28 February 2002 01:12, Bryan C. Warnock wrote:
> (Starts off at 90 recovered entries, then 88, 86, ..., 4, 2, 1, 128, 126,
> etc.)  The number of entries before decreasing seems to increase.  I'll
> see if I can extract a pattern.
>
> It's similar to the previous patterns, albeit a little flatter.  24, 24,
> 26, 26, 27, 28, 28, 30, ... 331, 443, 667, 1340, 21, 21, 21, 22, 23, 24,
> ....
>
> Where's the correlation there?
>
> The fewer entries you are able to recover, the less likely you are to lose
> two.  The more entries you recover, the more likely you are.  Dan?

Duh!  Sometimes sleep is good.

I went back and correlated the number of entries recovered to the 
generations.  It leaks on every generation.  (I don't know if that occurs at 
the start or at the end of each generation.)  

{time passes}

Actually, now, maybe I do.  They're at the beginning.
Just to make sure we're working off the same file, this is all I added to 
life.pasm:

Index: examples/assembly/life.pasm
===================================================================
RCS file: /home/perlcvs/parrot/examples/assembly/life.pasm,v
retrieving revision 1.6
diff -u -r1.6 life.pasm
--- examples/assembly/life.pasm 28 Feb 2002 00:27:50 -0000      1.6
+++ examples/assembly/life.pasm 28 Feb 2002 13:26:41 -0000
@@ -44,6 +44,7 @@
        bsr dump
        set I0, 0
 loop:  ge I0, I2, getout
+        print I0
        inc I0

        bsr generate


A generation (for reporting purposes) begins when the added 'print I0' 
actually prints to stdout.

The second call to new_string_header() in each generation loses one entry in 
the string header pool during DOD.  The twelfth call to new_string_header() 
in each generation loses the second.  *That* should be enough info to track 
down this particular problem child.

(That's a delta of ten, which also matches the number of additional calls to 
new_string_header you're making per run.  That's probably a coincidence, 
particularly since it's actually nine calls between the two leaking calls, 
and eleven if you include the leaking calls, but you never know.)


-- 
Bryan C. Warnock
bwarnock@capita.com

Thread Previous | 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