[9] RFR(S): 8065334: CodeHeap expansion fails although there is uncommitted memory
Tobias Hartmann
tobias.hartmann at oracle.com
Fri Jan 22 08:48:59 UTC 2016
Thanks, Vladimir.
Best,
Tobias
On 21.01.2016 20:18, Vladimir Kozlov wrote:
> Good.
>
> Thanks,
> Vladimir
>
> On 1/21/16 2:46 AM, Tobias Hartmann wrote:
>> Hi,
>>
>> please review the following patch:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8065334
>> http://cr.openjdk.java.net/~thartmann/8065334/webrev.00/
>>
>> If ReservedCodeCacheSize (or the size of a single code heap) is not a multiple of CodeCacheExpansionSize, the last code heap expansion fails, leaving unused uncommitted memory. For example, see [1]. Both the profiled and the non-profiled segments are full but there is still 32Kb of uncommitted space that is never used (CodeCacheExpansionSize is 64Kb).
>>
>> CodeHeap::expand_by() should check for this condition and commit all the remaining space even if the requested expansion size is larger. Like this, we use all the available space [2].
>>
>> Thanks,
>> Tobias
>>
>>
>> [1] Baseline:
>> CodeHeap 'non-nmethods': size=5696Kb used=2403Kb max_used=2433Kb free=3292Kb
>> bounds [0x00007f4d83b27000, 0x00007f4d83d97000, 0x00007f4d840b7000]
>> CodeHeap 'profiled nmethods': size=120032Kb used=119999Kb max_used=119999Kb free=32Kb
>> bounds [0x00007f4d840b7000, 0x00007f4d8b5e7000, 0x00007f4d8b5ef000]
>> CodeHeap 'non-profiled nmethods': size=120032Kb used=119999Kb max_used=119999Kb free=32Kb
>> bounds [0x00007f4d8b5ef000, 0x00007f4d92b1f000, 0x00007f4d92b27000]
>> total_blobs=248449 nmethods=52 adapters=570
>> compilation: disabled (not enough contiguous free space left)
>>
>> [2] Fixed:
>> CodeHeap 'non-nmethods': size=5696Kb used=2404Kb max_used=2436Kb free=3291Kb
>> bounds [0x00007fe8cd000000, 0x00007fe8cd270000, 0x00007fe8cd590000]
>> CodeHeap 'profiled nmethods': size=120032Kb used=120031Kb max_used=120031Kb free=0Kb
>> bounds [0x00007fe8cd590000, 0x00007fe8d4ac8000, 0x00007fe8d4ac8000]
>> CodeHeap 'non-profiled nmethods': size=120032Kb used=120032Kb max_used=120032Kb free=0Kb
>> bounds [0x00007fe8d4ac8000, 0x00007fe8dc000000, 0x00007fe8dc000000]
>> total_blobs=10665 nmethods=127 adapters=570
>> compilation: disabled (not enough contiguous free space left)
>>
More information about the hotspot-compiler-dev
mailing list