JDK-8185525 : Add JFR event for DictionarySizes
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-07-28
  • Updated: 2019-12-20
  • Resolved: 2019-05-08
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.

To download the current JDK release, click here.
JDK 13
13 b20Fixed
Related Reports
Blocks :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Add JFR event to show loaded class dictionary sizes.  See related RFEs. 
Also add JFR events for re-sizing the system dictionary as well.
Comments
I'll remove the jdk11u-fix-request label for now. For these JFR event backports we should have a separate sync and come up with a list of things that really merit backporting to 11 (and eventually 8)
20-12-2019

When backporting this to 11, JDK-8223599 needs to be included.
10-10-2019

Fix Request This patch does not apply cleanly to 11u and requires adjustments. 11u RFR: https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2019-September/001939.html
27-09-2019

Adding an example of 60sec jfr recording from Java2Demo, showing the new events.
29-03-2019

The "addRate" and "removeRate" for "SymbolTable" and "StringTable" appear slightly off compared to the "numberOfEntries", but that's only because those are concurrent hash tables, so any instantaneous values can get out of sync when we create event. I made sure, however, that throughout the tables lifetime, those values accurately track the entries count to match the tables sizes.
29-03-2019

The following event attributes are implemented: <Field type="ulong" name="numberOfBuckets" label="Number of buckets" description="Number of buckets" /> <Field type="ulong" name="numberOfEntries" label="Number of entries" description="Number of all entries" /> <Field type="ulong" contentType="bytes" name="totalFootprint" label="Total footprint" description="Total memory footprint (the table itself plus all of the entries)" /> <Field type="ulong" name="maximumBucketSize" label="Maximum bucket size" description="The maximum bucket length (entries in a single bucket)" /> <Field type="double" name="averageBucketSize" label="Average bucket size" description="The average bucket length (entries in a bucket)" /> <Field type="double" name="varianceOfBucketSize" label="Variance of bucket sizes" description="How far bucket lengths are spread out from their average value" /> <Field type="double" name="stdDevOfBucketSize" label="Standard deviation of bucket sizes" description="How far bucket lengths are spread out from their mean (expected) value" /> <Field type="double" name="addRate" label="Rate of addition" description="How many items were added since last event (per second)" /> <Field type="double" name="removeRate" label="Rate of removal" description="How many items were removed since last event (per second)" />
29-03-2019

Added events for the following tables: SymbolTable StringTable Placeholder Table LoaderConstraints Table ProtectionDomainCache Table I did not do "System Dictionary" itself because now it looks to be just a shared table. Though the 3 other ables that "System Dictionary" contains are included (Placeholder Table, LoaderConstraints Table, ProtectionDomainCache Table)
29-03-2019

JDK-8155247 explicitly lists these attributes needed: * Number of buckets * Number of entries * Number of literals * Total footprint * Average bucket size * Std dev of bucket size * Max bucket size JDK-8184994 implemented these (for "VM.symboltable -verbose" jcmd ): 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
06-03-2019

May be interesting to add rate (per second) as well (from previous event). Support would be able to see if a value is unexpected high (compared to what they normally see) and you could home in on the cause by setting a short period, for example 1 s.
27-02-2019

Here is the list of dictionaries needing these events: System Dictionary SymbolTable StringTable Placeholder Table LoaderConstraints Table ProtectionDomainCache Table is there more?
27-02-2019

Is this a bug? Sounds like an enhancement to me.
11-08-2017