[9] RFR(S): 8061436: Processing of options related to segmented code cache could be enhanced

Tobias Hartmann tobias.hartmann at oracle.com
Tue Nov 10 12:33:21 UTC 2015


Hi,

please review the following patch:

https://bugs.openjdk.java.net/browse/JDK-8061436
http://cr.openjdk.java.net/~thartmann/8061436/webrev.00/

I enhanced processing of code cache related size flags to allow the user to specify the size of an arbitrary code heap while the sizes of the other heaps are adjusted according to the ReservedCodeCacheSize. Before, either none or all flags had to be set. I removed the fragile code from arguments.cpp and implemented all the functionality in CodeCache::initialize_heaps().

The implementation works by checking which code heap sizes were explicitly set by the user and first verifies that their total size does not exceed the ReservedCodeCacheSize (with all other heaps set to the minimal size). If this is guaranteed, the sizes of the other heaps are adapted (increased or decreased) to make full use of the available ReservedCodeCacheSize. Hereby, we only change the size of the non-nmethod code heap if absolutely necessary. An assert verifies that the resulting code heap sizes correctly add up and all space is used.

Tested with RBT (hotspot_all and jdk_jfr). Additionally, I used a script to test many different size combinations and manually checked the (error) output.

Thanks,
Tobias


More information about the hotspot-compiler-dev mailing list