Code Cache, Compilation & Inlining

Christian Thalinger Christian.Thalinger at Sun.COM
Thu Jan 15 01:27:57 PST 2009


On Tue, 2009-01-13 at 11:45 +0000, Nicolas Michael wrote:
> My questions are:
> - How large is the code cache per default?

The reserved code cache size depends on the architecture and the
compiler used.  With a debug build you can use the -Xprintflags switch
to get the default size:

$ java -Xprintflags | grep CodeCacheSize
uintx InitialCodeCacheSize                 = 2555904          {pd product}
uintx ReservedCodeCacheSize                = 50331648         {pd product}

In this case (C2 on amd64) it's 48MB.

> - Is there any limit for the code cache? In my tests where I increased
> it, I set it to 128m (which is much too large, I assume, but worked).

AFAICT no, there is not.  You can set it as high as your architecture
can address memory.

-- Christian




More information about the hotspot-compiler-dev mailing list