Java HotSpot(TM) Server VM (build 20040602151820.mingyao.rt_merge-debug, mixed mode)
Test machine: j2se-bigapps-a.west ( 12cpu * 1200MHZ, sunfire E6500)
1. in vtest fastdebug run, codecache full and compiler disabled after 2.5 hours
2. in atg fastdebug run, codecache full and compiler disabled in first iteration.
JVM flags used:
-XX:+DeoptimizeALot -XX:+SafepointALot -XX:+UseConcMarkSweepGC
Java HotSpot(TM) Server VM warning: CodeCache is full. Compiler has been disabled.
How to reproduce:
1. use libjvm.so from /net/prt-archiver/export2/archived_workspaces/main/baseline/2004/20040602151820.mingyao.rt_merge
2. export JAVA_HOME=<your java home>
3. run the script
/net/jtgb4u4c.sfbay/export/sail8/bigapps/tests/runatg.ksh -server -XX:+UseConcMarkSweepGC -XX:+DeoptimizeALot -XX:+SafepointALot
or /net/jtgb4u4c.sfbay/export/sail8/bigapps/tests/runvtest.ksh -server
-XX:+UseConcMarkSweepGC -XX:+DeoptimizeALot -XX:+SafepointALo
I checked b54 bigapps log, there is no such warning message in production
The warning message also happened in vmark/vtest fastdebug runs on linux
On jtg-linux3, it happened in vtest run. The flags I used were:
-client -Xcomp -XX:+UseConcMarkSweepGC -XX:+DeoptimizeALot -XX:+SafepointALot
On jtg-linux13, it happened in vmark run. The flags I used were:
-server -XX:+UseConcMarkSweepGC -XX:+DeoptimizeALot -XX:+SafepointALot
So it happened in both C1 and C2 mode.
Out customers see performance degradation after running for long time which has the same cause.
When an application (for example, AppServer) runs for a long time (days, weeks) it may fill up
CodeCache and switch off JIT compilation since there are no space left in CodeCache.
After that point new methods will be executed only in Interpreter.
We need to clean up CodeCache more aggressively if that happened.
- Remove not entrant nmethods (OSR) more aggressively.
- Some compiled methods may never be used after application startup or they will be used
again only occasionally. Such method could be deoptimized and executed in Interpreter.
- Also CodeCache could be compacted (nmethods relocation) to get larger continuous free space.
- Reduce the size of uncommon code (there is fix in work for it already).