Re: [cp-patches] FYI: Add Enum.finalize()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 21, 2006 at 03:18:09PM +0100, Mark Wielaard wrote:
> Hi Christian,
> 
> On Thu, 2006-12-21 at 15:07 +0100, Christian Thalinger wrote:
> > An eclipse-3.2.1 startup-and-shutdown:
> > 
> > 3808 class loads
> > 10   classes have a finalizer
> > 4    of them are empty
> > 
> > Make your own decision :-)
> 
> Thanks for those stats! But aren't we actually interested in the number
> of instances of those 4 classes with empty finalizers (as percentage of
> object instances with and without finalizers)? I assume that the
> accounting and processing is per instance of such classes that are
> garbage collected. Then again I clearly have never written a garbage
> collector, especially not one that has to take into account all the
> tricks of java finalization.

You're absolutely right!  This is actually interesting:

3723 of 1171260 (w/: 4300, w/o: 1166960)

(these are heap allocations: empty finalizer, overall, with, and without
a finalizer)

87% precent of the heap allocations with a finalizer have an empty
finalizer.  The class responsible for this is java/util/zip/Inflater.

> 
> Is there any measurable runtime difference between the version that does
> and doesn't do empty-finalizer-erasure?

Have to do some benchmarks first...

- twisti


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux