[11] RFR(S): 8205499: C1 temporary code buffers are not removed with -XX:+UseDynamicNumberOfCompilerThreads

Tobias Hartmann tobias.hartmann at oracle.com
Fri Jun 29 08:09:08 UTC 2018


Thanks, Martin.

Best regards,
Tobias

On 29.06.2018 10:07, Doerr, Martin wrote:
> Hi Tobias,
> 
> thank you for fixing this issue. Looks good.
> 
> Best regards,
> Martin
> 
> 
> -----Original Message-----
> From: hotspot-compiler-dev [mailto:hotspot-compiler-dev-bounces at openjdk.java.net] On Behalf Of Tobias Hartmann
> Sent: Freitag, 29. Juni 2018 09:46
> To: Vladimir Kozlov <vladimir.kozlov at oracle.com>; hotspot compiler <hotspot-compiler-dev at openjdk.java.net>
> Subject: Re: [11] RFR(S): 8205499: C1 temporary code buffers are not removed with -XX:+UseDynamicNumberOfCompilerThreads
> 
> Thanks, Vladimir.
> 
> Best regards,
> Tobias
> 
> On 28.06.2018 19:22, Vladimir Kozlov wrote:
>> Looks good.
>>
>> Thanks,
>> Vladimir
>>
>> On 6/28/18 3:39 AM, Tobias Hartmann wrote:
>>> Hi,
>>>
>>> please review the following patch:
>>> https://bugs.openjdk.java.net/browse/JDK-8205499
>>> http://cr.openjdk.java.net/~thartmann/8205499/webrev.00/
>>>
>>> The problem is that with -XX:+UseDynamicNumberOfCompilerThreads, compiler threads are dynamically
>>> created and removed but the C1 temporary code buffers are not deallocated. As a result, the code
>>> cache fills up with long running applications, disabling compilation.
>>>
>>> I was able to reproduce this by slightly modifying the code such that compiler threads are
>>> aggressively added and removed. The code cache quickly fills up and we get the expected warning [1].
>>> I was not able to create a stable regression test because that would require to alternate between
>>> generating compilation tasks and waiting for compiler threads to become idle and get removed (i.e.,
>>> the test would be long running).
>>>
>>> The fix is to deallocate the code buffers in the thread destructor. I've verified that this solves
>>> the issue.
>>>
>>> Thanks,
>>> Tobias
>>>
>>> [1] Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled.
>>> Java HotSpot(TM) 64-Bit Server VM warning: Try increasing the code cache size using
>>> -XX:ReservedCodeCacheSize=
>>> CodeCache: size=51200Kb used=50978Kb max_used=50990Kb free=221Kb
>>>   bounds [0x00007fd068e00000, 0x00007fd06c000000, 0x00007fd06c000000]
>>>   total_blobs=1284 nmethods=237 adapters=787
>>>   compilation: disabled (not enough contiguous free space left)
>>>                stopped_count=1, restarted_count=0
>>>   full_count=0
>>> Java HotSpot(TM) 64-Bit Server VM warning: Initialization of C1 CompilerThread3 thread failed (no
>>> space to run compilers)
>>> Java HotSpot(TM) 64-Bit Server VM warning: Initialization of C1 CompilerThread5 thread failed (no
>>> space to run compilers)
>>> Java HotSpot(TM) 64-Bit Server VM warning: Initialization of C1 CompilerThread4 thread failed (no
>>> space to run compilers)
>>>


More information about the hotspot-compiler-dev mailing list