jcmd: separate metadata statistics from NMT?
Thomas Stüfe
thomas.stuefe at gmail.com
Tue Feb 20 14:23:15 UTC 2018
Hi,
So, I will add a new command to jcmd, "VM.metadata", which will use Zhengyu's
VM_PrintMetadata class to print out metaspace statistics.
Some questions:
- should I also remove the "metadata" sub command from VM.native_memory,
because "VM. native_memory metadata" would then be redundant to "VM.metadata
? I think yes, but I wanted to be sure you agree.
- should I also remove metaspace statistics from the NMT final report
(-XX:+PrintNMTStatistics)
? This one is less clear. It is clearly useful. If I remove it from
MemTracker::final_report(), I would have to re-add it somehow in another
place if we want to preserve the functionality.
Either way there will not be much code duplication, since all these print
routines only reuse existing code.
..Thomas
On Wed, Feb 14, 2018 at 3:19 PM, Thomas Stüfe <thomas.stuefe at gmail.com>
wrote:
>
>
> On Wed, Feb 14, 2018 at 3:11 PM, <coleen.phillimore at oracle.com> wrote:
>
>>
>>
>> On 2/14/18 4:26 AM, Thomas Stüfe wrote:
>>
>>> Hi all,
>>>
>>> JDK-8189688 introduced metadata printing into NMT. This is a very useful
>>> feature. However, it is tied to NMT, which is unnecessary.
>>>
>>> Currently, we have to trigger metadata statistics with jcmd with the
>>> NMT-printing command "VM.native_memory metadata". In order for that to
>>> work, NMT must have been enabled first in the monitored VM - so, the VM
>>> must have been started with -XX:NativeMemoryTracking=... . If not, "jcmd
>>> VM.native_memory" will give us an error. This diminishes its usefulness.
>>> We
>>> have many customer scenarios where we cannot restart the VM to enable NMT
>>> but still would like to see metadata statistics.
>>>
>>> The metadata statistics do not need the NMT infrastructure, they work
>>> perfectly fine without it. I propose to remove metadata statistics
>>> from "VM.native_memory"
>>> and make it an own first-class diagnostic command. I have made a quick
>>> patch to check if that would work and it works just fine.
>>>
>>> What do you think?
>>>
>>> Thanks and Kind Regards, Thomas
>>>
>>
>> This sounds good to me. Will NMT still print the metadata statistics
>> when you use -XX:+PrintNMTStatistics?
>> Coleen
>>
>>
> Yes, you are right, that should be preserved.
>
> ..Thomas
>
>
>
>
>
More information about the hotspot-runtime-dev
mailing list