RFR: 8184765: Dynamically resize SystemDictionary

Gerard Ziemski gerard.ziemski at oracle.com
Fri Oct 27 18:25:27 UTC 2017


hi Coleen,

Thank you for the review.

Updated webrev: http://cr.openjdk.java.net/~gziemski/8184765_rev2

> On Oct 11, 2017, at 9:10 AM, coleen.phillimore at oracle.com wrote:
> 
> 
> Gerard, some preliminary comments.
> 
> http://cr.openjdk.java.net/~gziemski/8184765_rev1/src/hotspot/share/classfile/systemDictionary.cpp.udiff.html
> 
> *+{*
> *!_MutexLocker mu(SystemDictionary_lock, THREAD_);*
> *!_Klass* probe = dictionary->find(_d_hash, name, protection_domain);*
> *if (probe != NULL) return probe;*
> **
> *+ }*
> 
> I don't think you need this because dictionary->find() should have the NoSafepointVerifier, so the index will not change.

Done, good catch.


> http://cr.openjdk.java.net/~gziemski/8184765_rev1/src/hotspot/share/classfile/classLoaderData.cpp.udiff.html
> 
> I think we want a global _some_dictionary_needs_resizing to avoid walking through the CLDG.
> 
> And have Dictionary have a field _resizing_needed to avoid the calculation during the safepoint, which is set when adding an entry.
> 
> _resizing_needed = *(number_of_entries() > (_resize_load_trigger*table_size());
> *CLDG::_any_resizing_needed |= _resizing_needed;   // or something like that.
> 
> I can write more about the rationale of this change in the bug report, if needed.

Done.


> 
> Thank you for doing this change.
> Coleen
> 
> 
> On 10/10/17 4:40 PM, Gerard Ziemski wrote:
>> hi all,
>> 
>> Please review this change that adds dynamic resizing of system dictionaries.
>> 
>> The biggest change is refactoring of the code that protects calculating of the table entry’s index using SystemDictionary_lock
>> 
>> A few notes:
>> 
>> - dynamic resizing is off when either dumping or using shared spaces
>> - we remove the experimental runtime option “PredictedLoadedClassCount” and add “DynamicallyResizeSystemDictionaries” to turn the resizing off (it’s on by default)
>> - the jtreg test uses stream of bytes to dynamically load numbered classes from memory instead of disk (thank you Ioi)
>> 
>> bug:    https://bugs.openjdk.java.net/browse/JDK-8184765
>> webrev: http://cr.openjdk.java.net/~gziemski/8184765_rev1
>> 
>> 
>> cheers
>> 
> 



More information about the hotspot-runtime-dev mailing list