JDK-8184994 : Add Dictionary size logging and jcmd
Type:Enhancement
Component:hotspot
Sub-Component:runtime
Affected Version:10
Priority:P3
Status:Resolved
Resolution:Fixed
Submitted:2017-07-20
Updated:2019-05-22
Resolved:2017-08-02
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
Logging -Xlog:hashtables is currently on for verification but not in production, where you'd want it. Add logging and jcmd for hashtable sizes.
Comments
Added jcmd <pid> VM.systemdictionary [-verbose] (it is VM.systemdictionary since it's VM.symboltable and VM.stringtable)
with output:
busaa027.us.oracle.com% jcmd 27918 VM.system_dictionary
27918:
System Dictionary for runThese$DirectoryClassLoader statistics:
Number of buckets : 107 = 1712 bytes, each 16
Number of entries : 10 = 320 bytes, each 32
Total footprint : = 2032 bytes
Average bucket size : 0.093
Variance of bucket size : 0.103
Std. dev. of bucket size: 0.322
Maximum bucket size : 2
System Dictionary for runThese$DirectoryClassLoader statistics:
Number of buckets : 107 = 1712 bytes, each 16
Number of entries : 9 = 288 bytes, each 32
Total footprint : = 2000 bytes
Average bucket size : 0.084
Variance of bucket size : 0.096
Std. dev. of bucket size: 0.309
Maximum bucket size : 2
...
System Dictionary for <bootloader> statistics:
Number of buckets : 1009 = 16144 bytes, each 16
Number of entries : 928 = 29696 bytes, each 32
Total footprint : = 45840 bytes
Average bucket size : 0.920
Variance of bucket size : 0.890
Std. dev. of bucket size: 0.944
Maximum bucket size : 5
Placeholder Table statistics:
Number of buckets : 1009 = 16144 bytes, each 16
Number of entries : 0 = 0 bytes, each 0
Total footprint : = 16144 bytes
Average bucket size : 0.000
Variance of bucket size : 0.000
Std. dev. of bucket size: 0.000
Maximum bucket size : 0
LoaderConstraints Table statistics:
Number of buckets : 107 = 1712 bytes, each 16
Number of entries : 7 = 224 bytes, each 32
Total footprint : = 1936 bytes
Average bucket size : 0.065
Variance of bucket size : 0.061
Std. dev. of bucket size: 0.247
Maximum bucket size : 1
ProtectionDomainCache Table statistics:
Number of buckets : 1009 = 16144 bytes, each 16
Number of entries : 19 = 608 bytes, each 32
Number of literals : 19 = 95 bytes, avg 5.000
Total footprint : = 16847 bytes
Average bucket size : 0.019
Variance of bucket size : 0.018
Std. dev. of bucket size: 0.136
Maximum bucket size : 1
SymbolTable and StringTable printing:
busaa027.us.oracle.com% jcmd 27918 VM.stringtable
27918:
StringTable statistics:
Number of buckets : 60013 = 960208 bytes, each 16
Number of entries : 4399 = 140768 bytes, each 32
Number of literals : 4399 = 324912 bytes, avg 73.860
Total footprint : = 1425888 bytes
Average bucket size : 0.073
Variance of bucket size : 0.074
Std. dev. of bucket size: 0.272
Maximum bucket size : 3
busaa027.us.oracle.com% jcmd 27918 VM.symboltable
27918:
SymbolTable statistics:
Number of buckets : 20011 = 320176 bytes, each 16
Number of entries : 31618 = 1011776 bytes, each 32
Number of literals : 31618 = 1427000 bytes, avg 45.133
Total footprint : = 2758952 bytes
Average bucket size : 1.580
Variance of bucket size : 1.589
Std. dev. of bucket size: 1.261
Maximum bucket size : 8
Passing -verbose gives the same output as -XX:+PrintSystemDictionaryAtExit