RFR JDK-8185582, Update Zip implementation to use Cleaner, not finalizers
Remi Forax
forax at univ-mlv.fr
Fri Sep 29 22:00:23 UTC 2017
Very cool,
i learn something today :)
Rémi
----- Mail original -----
> De: "mandy chung" <mandy.chung at oracle.com>
> À: "core-libs-dev" <core-libs-dev at openjdk.java.net>
> Envoyé: Vendredi 29 Septembre 2017 23:45:18
> Objet: Re: RFR JDK-8185582, Update Zip implementation to use Cleaner, not finalizers
> On 9/29/17 2:38 PM, Peter Levart wrote:
>> I think the hotspot has an optimization and detects that finalize()
>> has no bytecodes and treats the object as not needing finalization.
> http://hg.openjdk.java.net/jdk10/master/file/7d67bb6b0599/src/hotspot/share/classfile/classFileParser.cpp#l4250
>
> // Check if this klass has an empty finalize method (i.e. one with
> return bytecode only),
> // in which case we don't have to register objects as finalizable
> if (!_has_empty_finalizer) {
> if (_has_finalizer ||
> (super != NULL && super->has_finalizer())) {
> ik->set_has_finalizer();
> }
> }
>
> Mandy
More information about the core-libs-dev
mailing list