[jdk11u-dev] RFR: 8312138: jcmd VM.metaspace vslist has no newline character before the Class: label.
Kimura Yukihiro
duke at openjdk.org
Mon Jul 17 06:05:45 UTC 2023
I would like to fix this issue because the logs are not easy to read and users can misread the useful logs.
Could anyone review the fix please?
There is a test to verify VM.metaspace vslist in hotspot/jtreg/runtime/Metaspace/PrintMetaspaceDcmd.java,
but it does not check this issue.
I think we do not need to add a new test to the jtreg test sets, once we verified that the logs are output correctly.
The issue has been fixed since jdk17 as one of the fixes for JDK-8251158.
The fix I propose is not a backport of JDK-8251158.
I imported the fix from https://github.com/openjdk/jdk/blob/7ba6a6bf003b810e9f48cb755abe39b1376ad3fe/src/hotspot/share/memory/metaspace/metaspaceReporter.cpp#L254
I verified that a newline character is added before the "Class:" label and the logs are easier to read before fix:
Virtual space lists:
Non-Class:
1 nodes, current node: 0x00007f3b5c09a650
node @0x00007f3b5c09a650: reserved=8.00 MB, committed=4.25 MB ( 53%), used=4.19 MB ( 52%)
[0x00007f3b2f800000, 0x00007f3b2fc30000, 0x00007f3b2fc40000, 0x00007f3b30000000)
Class:
1 nodes, current node: 0x00007f3b5c09a450
node @0x00007f3b5c09a450: reserved=1.00 GB, committed=512.00 KB ( <1%), used=398.00 KB ( <1%)
[0x0000000100000000, 0x0000000100063800, 0x0000000100080000, 0x0000000140000000)
I also verifyed hotspot_all.
-------------
Commit messages:
- 8312138: jcmd VM.metaspace vslist has no newline character before the Class: label.
Changes: https://git.openjdk.org/jdk11u-dev/pull/2043/files
Webrev: https://webrevs.openjdk.org/?repo=jdk11u-dev&pr=2043&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8312138
Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk11u-dev/pull/2043.diff
Fetch: git fetch https://git.openjdk.org/jdk11u-dev.git pull/2043/head:pull/2043
PR: https://git.openjdk.org/jdk11u-dev/pull/2043
More information about the jdk-updates-dev
mailing list