Request review: 4360113: Evict nmethods when code cache gets full

Eric Caspole eric.caspole at
Fri Jan 8 10:56:11 PST 2010

On Jan 7, 2010, at 10:59 AM, Vladimir Kozlov wrote:
> Both these flags is for debugging. And I don't care about  
> ExitOnFullCodeCache
> since nobody used it for long time. But we always use CompileTheWorld
> for our testing. Also with recent Tom's changes for CompileTheWorld
> we may not have as much problems as before with filled code cache.
> This is why I said it should not be high priority for you only if
> it is simple to fix. And if you do the fix it could be applied to both
> flags - exit VM only if not space left even after cleanup.

Could you send me a cmd line for trying CompileTheWorld? I don't  
think I am doing it right, I tried:

$ time /home/ecaspole/jdk1.6.0_16/bin/java -XX:+CompileTheWorld -XX: 
+PrintCompilation  -version
VM option '+CompileTheWorld'
VM option '+PrintCompilation'
CompileTheWorld : Compiling all classes in /home/ecaspole/jdk1.6.0_16/ 

CompileTheWorld : Done

real    0m0.966s
user    0m0.205s
sys     0m0.721s

So it doesn't really do anything.

> Actually, I don't understand why it is need to be atomic.
> It is always one direction change:
> compiler broker change it to "false" and
> only sweeper (at safepoint) change it to "true".

What I was going for here is that when there are multiple compiler  
threads, probably more than one will hit the full condition more at  
less at once. I want to get the flag set and let me know if I  
actually set it. If I won to set it, I will run the cleaning op,  
otherwise I will go back and block and wait on the compile queue  
until the flag gets set back to true.


More information about the hotspot-compiler-dev mailing list