RFR (XS): JDK-8013496: Code cache management command line options work only in special order. Another order of arguments does not deliver the second parameter to the jvm.

Albert Noll albert.noll at oracle.com
Fri May 3 10:26:16 PDT 2013

Hi Vladimir,
thank you for the feedback. I tried to execute a simple "Hello World" on 
my system.
- with "-Xint": 2MB are fine
- with "-XX:+TieredCompilation" and 2MB, hotspot crashes:
   #  Internal Error 
pid=23449, tid=140038076614400
   #  guarantee(blob != NULL) failed: must create initial code buffer
- with "-XX:+TieredCompilation" and 2.1MB: fine

Interestingly, "java -Xint -XX:+TieredCompilation" is legal too. I guess 
we should change that too.

How about a minimum code cache size of 4MB?


On 05/03/2013 05:07 PM, Vladimir Kozlov wrote:
> My latest check of used codecache before JIt compilation shows that 
> more than 1Mb was used (template interpreter, stubs, adapters). I 
> think 1K is too small. Run (for example, on sparc) a small program 
> with -Xint to see how much you need. Also we have and 
> CodeCacheMinimumFreeSpace=500k parameter. So I would guess we need 
> something around 2Mb to run VM in interpreter mode.
> Otherwise changes are good.
> Thanks,
> Vladimir
> On 5/3/13 5:54 AM, Albert Noll wrote:
>> Hi,
>> please review the patch.
>> Many thanks in advance,
>> Albert
>> jbs: https://jbs.oracle.com/bugs/browse/JDK-8013496
>> webrev: http://cr.openjdk.java.net/~adlertz/JDK-8013496/webrev00/
>> Problem:
>> The order in which the arguments  "-XX:ReservedCodeCacheSize=1m" and
>> "-XX:InitialCodeCacheSize=500k"
>> are given to hotspot mattered. In particular, the above order resulted
>> in an error:
>> Invalid maximum code cache size: -XX:ReservedCodeCacheSize=1m. Should be
>> greater than InitialCodeCacheSize=2496K
>> Error: Could not create the Java Virtual Machine.
>> Error: A fatal exception has occurred. Program will exit.
>> Fix: Moved the check: ReservedCodeCacheSize >= InitialCodeCacheSize to
>> Arguments::check_vm_args_consistency()
>> (as suggested in the comment).
>> Currently, the minimum ReservedCodeCacheSize is 1K. Any thoughts on 
>> that?

More information about the hotspot-compiler-dev mailing list