On Fri, 19 Nov 2021 22:50:49 GMT, David Holmes wrote:
>> Regarding **jcmd** updates, I'm thinking maybe this would be better handled
>> separately. There is the potential to update to `GC.finalizer_info`
>> discussed previously. Looking at the **jcmd** tool docs, it seems like
>>
On Fri, 19 Nov 2021 20:13:06 GMT, Stuart Marks wrote:
>> Stuart Marks has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Remove Finalizer.Holder class.
>
> Regarding **jcmd** updates, I'm thinking maybe this would be better handled
>
On Fri, 19 Nov 2021 00:14:18 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
On Fri, 19 Nov 2021 00:14:18 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
On Fri, 19 Nov 2021 00:14:18 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
On Fri, 19 Nov 2021 02:29:33 GMT, Stuart Marks wrote:
>>> When the finalization is disabled, perhaps jcmd GC.finalizer_info should
>>> just be made as a nop in the VM.
>>
>> Yes that is a trivial change to add. @stuart-marks I can provide the code.
>> You can choose whether to include in this
On Fri, 19 Nov 2021 00:14:34 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 Fri, 19 Nov 2021 00:59:10 GMT, David Holmes wrote:
>> Stuart Marks has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Remove Finalizer.Holder class.
>
> src/java.base/share/classes/java/lang/ref/Finalizer.java line 64:
>
>> 62: }
On Fri, 19 Nov 2021 01:03:22 GMT, David Holmes wrote:
> > When the finalization is disabled, perhaps jcmd GC.finalizer_info should
> > just be made as a nop in the VM.
>
> Yes that is a trivial change to add. @stuart-marks I can provide the code.
> You can choose whether to include in this PR
On Fri, 19 Nov 2021 00:14:18 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
On Thu, 18 Nov 2021 23:36:23 GMT, Brent Christian wrote:
> When the finalization is disabled, perhaps jcmd GC.finalizer_info should just
> be made as a nop in the VM.
Yes that is a trivial change to add. @stuart-marks I can provide the code. You
can choose whether to include in this PR or
On Fri, 19 Nov 2021 00:14:18 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
On Thu, 18 Nov 2021 04:13:21 GMT, Jaikiran Pai wrote:
>> Stuart Marks has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Remove Finalizer.Holder class.
>
> src/java.base/share/classes/java/lang/ref/Finalizer.java line 195:
>
>> 193:
>>
> 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 21:15:11 GMT, Mandy Chung wrote:
> When the finalization is disabled, perhaps jcmd GC.finalizer_info should just
> be made as a nop in the VM.
Would it be interesting (perhaps in a follow-up) for GC.finalizer_info to
report that the given VM had finalization disabled?
On Thu, 18 Nov 2021 20:05:15 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
Hi Mandy,
On 19/11/2021 6:16 am, Mandy Chung wrote:
On Thu, 18 Nov 2021 06:49:03 GMT, Kim Barrett wrote:
src/hotspot/share/prims/jvm.cpp line 694:
692:
693: JVM_ENTRY(jboolean, JVM_IsFinalizationEnabled(JNIEnv * env))
694: return InstanceKlass::finalization_enabled() ? JNI_TRUE :
On Thu, 18 Nov 2021 22:04:52 GMT, Stuart Marks wrote:
>> I renamed the function to `is_finalization_enabled` per previous comment,
>> and I also made these cleanups.
>
> Regarding using system properties, my initial prototype did this in the
> launcher, and it did run into the problem that the
On Thu, 18 Nov 2021 21:19:44 GMT, Stuart Marks wrote:
>> One typical way for VM to pass the arguments to the library is via private
>> system properties. System::initPhase1 will save the VM properties in
>> `jdk.internal.misc.VM` and filters out the private properties from the
>> system
On Thu, 18 Nov 2021 06:47:05 GMT, Aleksey Shipilev wrote:
>> Stuart Marks has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Rename InstanceKlass::finalization_enabled to is_finalization_enabled.
>> Minor cleanups.
>
>
On Thu, 18 Nov 2021 20:13:23 GMT, Mandy Chung wrote:
>> I think this could just be `return InstanceKlass::finalization_enabled();`.
>> There is lots of code in this file and elsewhere that assumes C++ `bool`
>> converts to `jboolean` appropriately.
>
> One typical way for VM to pass the
On Thu, 18 Nov 2021 20:05:15 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
On Thu, 18 Nov 2021 06:49:03 GMT, Kim Barrett wrote:
>> src/hotspot/share/prims/jvm.cpp line 694:
>>
>>> 692:
>>> 693: JVM_ENTRY(jboolean, JVM_IsFinalizationEnabled(JNIEnv * env))
>>> 694: return InstanceKlass::finalization_enabled() ? JNI_TRUE : JNI_FALSE;
>>
>> missing indentation
>
> I
> 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:52:18 GMT, David Holmes wrote:
>> Yeah, "flag" is `Holder.ENABLED` here. I mean, are Java methods
>> `registerFinalizer` and `runFinalization` called only by VM? If so, can VM
>> check the whole thing on VM side, without going to Java and asking back from
>> there?
>
>
On Thu, 18 Nov 2021 15:05:49 GMT, Peter Levart wrote:
>> Or, you could move the static initialization block that statrts the
>> finalizer thread into the Finalizer.FinalizerThread class itself and then
>> arrange for that class to be initialized explicitly immediately after the
>> Finalizer
On Thu, 18 Nov 2021 14:53:38 GMT, Peter Levart wrote:
>> I think @shipilev asks a good question. This could be done completely in the
>> VM without the changes to j.l.ref.Finalizer. The CLI option is for
>> experimenting, at least in the short term, and should be benign to have the
>>
On Thu, 18 Nov 2021 08:39:52 GMT, Alan Bateman wrote:
>> Yeah, "flag" is `Holder.ENABLED` here. I mean, are Java methods
>> `registerFinalizer` and `runFinalization` called only by VM? If so, can VM
>> check the whole thing on VM side, without going to Java and asking back from
>> there?
>
>
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: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: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: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 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 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 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
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 to
43 matches
Mail list logo