RFR(XS) 8191924: Adjust DelegatingClassLoader's metadata space sizing algorithm

Zhengyu Gu zgu at redhat.com
Tue Mar 13 18:19:56 UTC 2018


Thanks, Coleen.

-Zhengyu

On 03/13/2018 02:11 PM, coleen.phillimore at oracle.com wrote:
> This change looks good!
> Coleen
> 
> On 3/13/18 1:22 PM, Zhengyu Gu wrote:
>> Please review this simple patch, that applies the same sizing 
>> algorithm for anonymous class loader [1] to delegating class loader.
>>
>> Delegating class loader has similar memory usage pattern as anonymous 
>> class loader. By applying the same sizing logic, it reduces about the 
>> same percentage of wasted memory as anonymous class loader's metedata 
>> space.
>>
>> Ex.
>>
>> Before:
>> ClassLoader: jdk/internal/reflect/DelegatingClassLoader
>>   Metadata   capacity=      5.00KB used=      1.55KB free= 3.45KB 
>> waste=      0.04KB
>>   Class data capacity=      1.00KB used=      0.58KB free= 0.42KB 
>> waste=      0.00KB
>>
>> After:
>> ClassLoader: jdk/internal/reflect/DelegatingClassLoader
>>   Metadata   capacity=      2.00KB used=      1.55KB free= 0.45KB 
>> waste=      0.04KB
>>   Class data capacity=      1.00KB used=      0.58KB free= 0.42KB 
>> waste=      0.00KB
>>
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8191924
>> Webrev: http://cr.openjdk.java.net/~zgu/8191924/webrev.00/
>>
>> Test:
>>
>>   hotspot_runtime on Linux x64 (fastdebug and release)
>>
>>
>> [1]https://bugs.openjdk.java.net/browse/JDK-8190729
>>
>> Thanks,
>>
>> -Zhengyu
>>
> 


More information about the hotspot-runtime-dev mailing list