RFR: 8266936: Add a finalization JFR event [v11]
coleenp at openjdk.java.net
Thu Sep 23 22:38:52 UTC 2021
On Mon, 13 Sep 2021 17:12:49 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:
>> 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 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().
> Markus Grönlund has updated the pull request incrementally with two additional commits since the last revision:
> - remove rehashing and rely on default grow_hint for table resize
> - mtStatistics
src/hotspot/share/jfr/periodic/jfrFinalizerStatisticsEvent.cpp line 26:
> 25: #include "precompiled.hpp"
> 26: #if INCLUDE_MANAGEMENT
With precompiled headers turned off, this gets a compilation error:
error: "INCLUDE_MANAGEMENT" is not
defined, evaluates to 0 [-Werror=undef]
More information about the core-libs-dev