On Fri, 9 Jul 2021 18:21:25 GMT, Brent Christian <bchri...@openjdk.org> wrote:

>> Greetings,
>> 
>> Object.finalize() was deprecated in JDK9. There is an ongoing effort to 
>> replace and mitigate Object.finalize() uses in the JDK libraries; please see 
>> https://bugs.openjdk.java.net/browse/JDK-8253568 for more information. 
>> 
>> We would also like to assist users in replacing and mitigating uses in 
>> non-JDK code.
>> 
>> Hence, this changeset adds a periodic JFR event to help identify which 
>> classes are overriding Object.finalize().
>> 
>> Thanks
>> Markus
>
> src/hotspot/share/jfr/metadata/metadata.xml line 1084:
> 
>> 1082:   </Event>
>> 1083: 
>> 1084:   <Event name="Finalizer" category="Java Application" 
>> label="Finalizer" thread="false" startTime="false" period="endChunk">
> 
> Would it make sense for this event to be under the "Java Virtual Machine, GC" 
> category?

My argument for placing the event in the Java Application category:

The finalization concept is, or maybe more correctly has been, reified in the 
Java language. The Java programmer decides to enlist the exposed functionality, 
similar to Java language Exceptions and Errors. JFR already represents events 
for these latter concepts in the Java Application category because programmers 
directly interact with and, in contrast to many events in the JVM category, 
have more control over them.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4731

Reply via email to