RFR: 8074345: Enable RewriteBytecodes when VM runs with CDS

Yumin Qi yumin.qi at oracle.com
Thu Mar 5 21:21:32 UTC 2015

Please review:

bug: https://bugs.openjdk.java.net/browse/JDK-8074345
webrev: http://cr.openjdk.java.net/~minqi/8074345/

Summary: Currently CDS when is disabled, RewriteBytecodes and 
RewriteFrequentPairs are disabled due to ConstantMethod in CDS are 
mapped read only. So memory fault will be triggered when 
RewriteBytecodes turned on. This also disable all method rewritten, 
leads interpreter run slower. Observed about 2% regression with C2 on 
some benchmarks, since interpreter speed is important to C2. By enable 
RewriteBytecodes and RewriteFrequentPairs under CDS enabled, adding 
_nofast_xxxx for corresponding fast codes at dump time to avoid byte 
code rewritten at run time, we prevent byte code rewritten and modify 
the read only shared portion in CDS. Meanwhile other byte codes with 
fast codes still get speed up.

Tests: JPRT, jtreg, refworkload (20+ benchmarks) on all supported 
platforms.  Interpreter only tests showed about 3% improvement.


More information about the hotspot-runtime-dev mailing list