reclaim code cache
Albert Noll
albert.noll at oracle.com
Tue Nov 26 08:22:45 PST 2013
Hi Xin,
The code cache maintains a free list. If memory is released from the code cache, the free list is updated accordingly.
You can verify that by downloading the latest build of hotspot (117) and start the VM with the following flag:
-XX:ReservedCodeCacheSize=8m
You can also try smaller code cache sizes. You will see after some time that the code cache fills up (a corresponding message will be displayed on the console). However, methods will still be compiled ( you can see that by using -XX:+PrintCompilation) since the code cache sweeper removes methods from the code cache and that memory is being reused.
Best,
Albert
Von meinem iPhone gesendet
> Am 26.11.2013 um 16:48 schrieb Xin Tong <trent.tong at gmail.com>:
>
> Hi Albert
>
> Thank you. I am trying to make the claim that self-modifying code happens in bulk when running java workloads in a dynamic binary translator. i.e. the reclaimed memory for zombie methods in the code cache are reused for other methods. i run the dacapo eclipse benchmark and see some of the methods being zombized but no methods are JITted to the reclaimed memory ? what are some of the criteria/conditions for the JIT to reuse the reclaimed memory ?
>
> Xin
>
>
>> On Tue, Nov 26, 2013 at 7:33 AM, Albert Noll <albert.noll at oracle.com> wrote:
>> Hi Xin,
>>
>> if the code cache sweeper removes a method from the code cache, memory is
>> made available for later compilations.
>>
>> Best,
>> Albert
>>
>>
>>> On 11/26/2013 03:58 PM, Xin Tong wrote:
>>> Hi
>>>
>>> I see some of the methods are made *non-entrant* and then *zombie* in
>>> the OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode). I am wondering
>>> whether OpenJDK reuses memory for those methods for later compiled methods
>>> or not ?
>>>
>>> Thank you,
>>> Xin
>
More information about the hotspot-dev
mailing list