原因可能仍然是选项:UseCodeCacheFlushing=true。JDK 3 的默认配置如下:
$ java -XX:+PrintFlagsFinal -version | grep CodeCacheFlush
bool UseCodeCacheFlushing = true {product}
java 版本 "1.8.0_25" Java(TM) SE Runtime Environment (build 1.8.0_25-b18) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, 混合模式)
$ ./java -XX:+PrintFlagsFinal -version | grep CodeCacheFlush
uintx CodeCacheFlushingMinimumFreeSpace = 1536000 {product}
intx MinCodeCacheFlushingInterval = 30 {product}
bool UseCodeCacheFlushing = true {product}
java 版本 "1.7.0_79" Java(TM) SE Runtime Environment (build 1.7.0_79-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, 混合模式)
$ java -XX:+PrintFlagsFinal -version | grep CodeCacheFlush
uintx CodeCacheFlushingMinimumFreeSpace = 1536000 {product}
intx MinCodeCacheFlushingInterval = 30 {product}
bool UseCodeCacheFlushing = true {product}
Java 版本“1.7.0_51”Java(TM) SE 运行时环境(构建 1.7.0_51-b13)Java HotSpot(TM) 64 位服务器 VM(构建 24.51-b03,混合模式)