Extra PMC allocations with new ['Integer']

Patrick R. Michaud pmichaud at pobox.com
Mon Feb 7 13:16:32 UTC 2011


On Sun, Feb 06, 2011 at 12:55:58PM -0500, Peter Lobsinger wrote:
> > I'm sure that some of the PMCs are being created to support the PMCProxy
> > instances.... but *38*?  That number seems surprisingly high, so I
> > thought I'd bring it up to the list and see if anyone has any ideas
> > about why and where so many extra PMCs are being created.
> 
> Confirmed, PMCProxy objects are being created.
> 
> It is interesting to note that of those 38, only 12 persist after a GC
> run (add the sweep/collect code before the interpinfo query). Of those
> 12, 8 can be directly accounted for in Class.init() (parent of
> PMCProxy). That leaves only 4 persisting PMCs unaccounted for.

Ah, I didn't check to see how many persisted -- good catch.  12 seems
like a more reasonable number of PMCs for handling a Proxy.  For 3 of the
other 4 persistent PMCs, I suspect:
    - the ['Integer'] namespace
    - the isa cache
    - the 'proxy' object/attribute

> So which of these are we concerned about the most? The 26 contributing
> to GC churn? The 8 caused by Class being fat? Or the 4 I haven't
> bothered to track down?

With only 12 persistent PMCs, I'm much less concerned about it.  It's still
a little surprising that constructing the PMCProxy needed 26 temporaries,
but probably not worth tracking down since it's a one-time cost per PMCProxy.

Thanks!

Pm


More information about the parrot-dev mailing list