RFR: 8184765: Dynamically resize SystemDictionary
coleen.phillimore at oracle.com
coleen.phillimore at oracle.com
Wed Oct 11 14:10:34 UTC 2017
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.
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.
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