RFR: 8275775: VM.metaspace prints flag 'f' for classes that overrided finalize()

Yi Yang yyang at openjdk.java.net
Tue Oct 26 02:32:13 UTC 2021


On Mon, 25 Oct 2021 00:38:48 GMT, David Holmes <dholmes 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?
>
> src/hotspot/share/memory/metaspace/printMetaspaceInfoKlassClosure.cpp line 50:
> 
>> 48: 
>> 49:   ResourceMark rm;
>> 50:   _out->print("  %s (" INTPTR_FORMAT ")", k->external_name(), p2i(k));
> 
> Why do we need the address printed?

I guess this would facilitate further debugging. I will remove them if you think they are not necessary.

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

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


More information about the hotspot-runtime-dev mailing list