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

Yi Yang yyang at openjdk.java.net
Wed Oct 27 08:09:17 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 Thomas and David,

I was convinced by above comments. VM.metaspace may not be a good place, because as explained that it prints info related to the memory usage of metadata. On the other hand, we do encounter some real scenarios to inspect InstanceKlass. jhsdb is not capable in product environment. I think `jcmd VM.classes` is a more suitable place to output this information as we already have VM.classloaders/VM.symboltable/VM.systemdictionary, it is also flexible for subsequent extension (e.g. print more flags and more detailed class information) and easy to use. In my preliminary idea, `jcmd VM.classes` outputs summary class information, just like what PrintCompilation did, `jcmd VM.classes details` outputs detailed class information. Any idea is appreciated.

Thanks!

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

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


More information about the hotspot-runtime-dev mailing list