RFR: 8275775: VM.metaspace prints flag 'f' for classes that have non-trivial finalize() [v3]

Yi Yang yyang at openjdk.java.net
Mon Nov 1 07:19:09 UTC 2021


On Wed, 27 Oct 2021 01:30:37 GMT, Yi Yang <yyang at openjdk.org> wrote:

>> Some customers want to observe which loaded classes have overridden the finalize() method. I found that VM.metaspace can output detailed classes. It seems feasible to add 'f' flag to it. With this patch, I found that ZipFileSystem left a finalize after applying this patch, which was obsolete 5 years ago, maybe we should remove it?
>
> Yi Yang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   typo

Hi David,

> Do we have sufficient class information to combine with the finalize() status, remembering that we will be reporting on every single class, to make VM.classes worthwhile? Would a simple command to list all non-trivially-finalizable classes be useful in itself? VM.finalizable_classes?

VM.finalizable_classes seems to be too ad-hoc. The only purpose is to print the class that has non-trivial finalize() method. If, maybe one day in the future, we want to know which classes have miranda method, we may need to add another VM.miranda_classes command. VM.classes can print detailed information of all loaded classes of the JVM, which looks more extensible and flexible.

Thanks.

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

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


More information about the hotspot-runtime-dev mailing list