RFR: 8266936: Add a finalization JFR event [v4]
Bernd Eckenfels
ecki at zusammenkunft.net
Tue Jul 27 18:18:21 UTC 2021
Hello,
I know I am a bit late, but just wanted to mention, that since finding finalizers with Bytecode analysis is doable (and probably easier to deal with such scan reports), I don’t see much value in a JFR event, especially considering it even has native code executed. (Not so sure about dynamically loaded classes, would the event content help to identify sources?)
Having said that, this event would be more useful from a runtime perspective if It would actually record execution counts and time per class. Then one can concentrate on the worst offenders, first and even use it for runtime monitoring. Is there already a finalizer profiler?
Gruss
Bernd
--
http://bernd.eckenfels.net
________________________________
Von: core-libs-dev <core-libs-dev-retn at openjdk.java.net> im Auftrag von Markus Grönlund <mgronlun at openjdk.java.net>
Gesendet: Tuesday, July 27, 2021 5:14:29 PM
An: core-libs-dev at openjdk.java.net <core-libs-dev at openjdk.java.net>; hotspot-jfr-dev at openjdk.java.net <hotspot-jfr-dev at openjdk.java.net>
Betreff: Re: RFR: 8266936: Add a finalization JFR event [v4]
> 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 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
Markus Grönlund has updated the pull request incrementally with one additional commit since the last revision:
remove build directive
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/4731/files
- new: https://git.openjdk.java.net/jdk/pull/4731/files/58fc3f0a..44988036
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4731&range=03
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4731&range=02-03
Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/4731.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4731/head:pull/4731
PR: https://git.openjdk.java.net/jdk/pull/4731
More information about the core-libs-dev
mailing list