RFR: 8275775: VM.metaspace prints flag 'f' for classes that have non-trivial finalize() [v3]
Yi Yang
yyang at openjdk.java.net
Tue Nov 2 03:43:13 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
Personally and ideally, I hope JCMD can provide several types of general commands, allow users to quickly find what they want, and then we can add more subcommands for advanced usages.
For example, we provide:
VM.classes
VM.classloaders
VM.stringtable
VM.symboltable
VM.cds
VM.metaspace
It’s easy to know what it does and what users want. Then we add some subcommands for debugging/diagnostic support. In this way, we can further simplify the current commands, such as:
1. VM.classloaders = VM.classloaders + VM.classloader_stats
VM.classloaders prints current class loaders(VM.classloader_stats), we can also provide some advanced argument such as "hierarchy"(actually what VM.classloaders does now), "details" to print more information.
2. VM.command_line += VM.flags
VM Arguments:
jvm_args: -agentlib:jdwp=transport=dt_socket,address=localhost:23158
jvm_flag: <<<<<what VM.flags does>>>>
java_command: jdk.jshell.execution.RemoteExecutionControl 33170
java_class_path (initial):.
Launcher Type: SUN_STANDARD
Roughly thoughts.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6075
More information about the hotspot-runtime-dev
mailing list