Review request: 8025059: Metspace::should_expand mixes bytes and words in check against MaxMetaspaceSize

Stefan Karlsson stefan.karlsson at oracle.com
Fri Sep 20 05:47:25 PDT 2013


On 09/20/2013 02:10 PM, Coleen Phillmore wrote:
>
> This is good.

Thanks, Coleen.

StefanK

> Coleen
>
> On 9/20/2013 7:51 AM, Mikael Gerdin wrote:
>> Stefan,
>>
>> On 09/20/2013 01:35 PM, Stefan Karlsson wrote:
>>> The webrev I sent out contained a bug, that had been fixed in a later
>>> patch. I've incorporated that fix and reran the tests.
>>>
>>> Please, refresh you browser cache and re-review this patch.
>>
>> The change looks good to me.
>>
>> /Mikael
>>
>>>
>>> thanks,
>>> StefanK
>>>
>>> On 09/19/2013 04:59 PM, Stefan Karlsson wrote:
>>>> http://cr.openjdk.java.net/~stefank/8025059/webrev.00/
>>>> https://bugs.openjdk.java.net/browse/JDK-8025059
>>>>
>>>> The following code in Metaspace::should_expand:
>>>>
>>>> if (!FLAG_IS_DEFAULT(MaxMetaspaceSize)) {
>>>>   size_t real_allocated = Metaspace::space_list()->reserved_words() +
>>>> MetaspaceAux::allocated_capacity_bytes(Metaspace::ClassType);
>>>>   if (real_allocated >= MaxMetaspaceSize) {
>>>>     return false;
>>>>   }
>>>>
>>>> doesn't convert Metaspace::space_list()->reserved_words() to bytes, as
>>>> it should.
>>>>
>>>> Note that when JDK-8024547 gets fixed, this check will be rewritten to
>>>> limit the amount of committed memory in both the Class and NonClass
>>>> metaspaces. See:
>>>> https://bugs.openjdk.java.net/browse/JDK-8024547: MaxMetaspaceSize
>>>> should limit the committed memory used by the metaspaces
>>>>
>>>> Testing: I've run our internal testing that sets the MaxMetaspaceSize.
>>>>
>>>> thanks,
>>>> StefanK
>>>
>>
>



More information about the hotspot-dev mailing list