On Thu, 18 Nov 2021 07:44:05 GMT, Aleksey Shipilev wrote:
>> @shipilev not sure what you mean by "a flag on the Java side". The Java
>> code just queries the VM for the finalization enabled/disabled state and
>> uses that to control things.
>
> Yeah, "flag" is `Holder.ENABLED` here. I mean,
> Pretty much what it says. The new option controls a static member in
> InstanceKlass that's consulted to determine whether the finalization
> machinery is activated for instances when a class is loaded. A new native
> method is added so that this state can be queried from Java. This is used
On Thu, 18 Nov 2021 07:16:56 GMT, Kim Barrett wrote:
> There is nothing here to make the various GCs take advantage of finalization
> being disabled. Is the plan to leave that to followup changes?
@kimbarrett I provided the basic VM parts here. I'm not aware of what
specifically a GC might
On Thu, 18 Nov 2021 07:44:05 GMT, Aleksey Shipilev wrote:
>> @shipilev not sure what you mean by "a flag on the Java side". The Java
>> code just queries the VM for the finalization enabled/disabled state and
>> uses that to control things.
>
> Yeah, "flag" is `Holder.ENABLED` here. I mean,
On Thu, 18 Nov 2021 07:40:34 GMT, David Holmes wrote:
>> Do we even have to have a flag on Java side? It looks like these calls are
>> only done as the upcalls from VM, so we might just keep the flag on VM side?
>
> @shipilev not sure what you mean by "a flag on the Java side". The Java code
On Thu, 18 Nov 2021 07:27:30 GMT, Aleksey Shipilev wrote:
>> @stuart-marks not sure I see how anything is different here compared to the
>> existing logic. The `Finalizer` class is explicitly initialized quite early
>> in the init process, but if a preceding class's initialization created an
On Thu, 18 Nov 2021 07:13:55 GMT, David Holmes wrote:
>> Huh, good catch! This was mostly left over from an earlier version of the
>> flag that used system properties, which aren't initialized until after the
>> Finalizer class is initialized.
>>
>> It might be the case that the Holder can be
On Thu, 18 Nov 2021 01:34:36 GMT, Stuart Marks wrote:
> Pretty much what it says. The new option controls a static member in
> InstanceKlass that's consulted to determine whether the finalization
> machinery is activated for instances when a class is loaded. A new native
> method is added so
On Thu, 18 Nov 2021 05:20:02 GMT, Stuart Marks wrote:
>> src/java.base/share/classes/java/lang/ref/Finalizer.java line 195:
>>
>>> 193:
>>> 194: static {
>>> 195: if (Holder.ENABLED) {
>>
>> Hello Stuart,
>> My understanding of the the lazy `Holder` is that it's there to delay the
On Thu, 18 Nov 2021 01:34:36 GMT, Stuart Marks wrote:
> Pretty much what it says. The new option controls a static member in
> InstanceKlass that's consulted to determine whether the finalization
> machinery is activated for instances when a class is loaded. A new native
> method is added so
On Thu, 18 Nov 2021 06:43:01 GMT, Kim Barrett wrote:
>> Pretty much what it says. The new option controls a static member in
>> InstanceKlass that's consulted to determine whether the finalization
>> machinery is activated for instances when a class is loaded. A new native
>> method is added
On Thu, 18 Nov 2021 04:13:21 GMT, Jaikiran Pai wrote:
>> Pretty much what it says. The new option controls a static member in
>> InstanceKlass that's consulted to determine whether the finalization
>> machinery is activated for instances when a class is loaded. A new native
>> method is added
On Thu, 18 Nov 2021 01:34:36 GMT, Stuart Marks wrote:
> Pretty much what it says. The new option controls a static member in
> InstanceKlass that's consulted to determine whether the finalization
> machinery is activated for instances when a class is loaded. A new native
> method is added so
On Thu, 18 Nov 2021 01:34:36 GMT, Stuart Marks wrote:
> Pretty much what it says. The new option controls a static member in
> InstanceKlass that's consulted to determine whether the finalization
> machinery is activated for instances when a class is loaded. A new native
> method is added so
14 matches
Mail list logo