RFR(XXS) 8190729: Adjustment to anonymous metadata space chunk allocation algorithm

coleen.phillimore at oracle.com coleen.phillimore at oracle.com
Mon Nov 27 22:04:44 UTC 2017


Hi, this is a bit bigger than XXS but it looks good to me.   Only one nit:

+ if (_space_type == Metaspace::AnonymousMetaspaceType
+ && _mdtype == Metaspace::NonClassType
+ && sum_count_in_chunks_in_use(SpecializedIndex) < 
_anon_metadata_specialize_chunk_limit
+ && word_size + Metachunk::overhead() <= SpecializedChunk) {
+ return SpecializedChunk;
+ }
+


I think the coding style is that the && are on the right hand side.   In 
any case, I'll sponsor it for you.  Can you commit, and regenerate the 
webrev with the commit message?   So I can use wget to get the patch.

thanks!
Coleen

On 11/27/17 12:09 PM, Zhengyu Gu wrote:
> Hi,
>
> To follow up recent discussion of anonymous metadata space memory 
> usage, I would like submit this simple fix for review.
>
> By continuing allocating anonymous metadata space from SpecializeChunk 
> pool, up to 4 chunks, it reduces the waste from 60+% to about 30%.
>
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8190729
> Webrev: http://cr.openjdk.java.net/~zgu/8190729/webrev.00/
>
> Test:
>
>   hotspot_tier1_runtime on Linux x64 (fastdebug and release)
>
>
> Thanks,
>
> -Zhengyu



More information about the hotspot-dev mailing list