RFR (S): 8014972: Crash with specific values for -XX:InitialCodeCacheSize=500K -XX:ReservedCodeCacheSize=500k
Albert Noll
albert.noll at oracle.com
Thu Jun 20 04:02:27 PDT 2013
Hi,
thanks for reviewing this small patch.
Albert
jbs: https://jbs.oracle.com/bugs/browse/JDK-8014972
webrev: http://cr.openjdk.java.net/~anoll/8014972/webrev.00/
<http://cr.openjdk.java.net/%7Eanoll/8014972/webrev.00/>
Problem:
If -XX:ReservedCodeCacheSize is set too small, the VM crashes when
starting up.
Solution:
Introduce a minimum code cache size (ReservedCodeCacheSize) that
guarantees that the VM can startup. The minimum code cache size is
defined by a new parameter (MinimumInitialCodeCacheSize) that cannot be
changed in product build. My reasoning for this is that smaller values
make the JVM crash at startup. However, in a development build, the
parameter can be changed.
The current patch sets MinimumInitialCodeCacheSize to 400k for all
platforms. On Solaris, MinimumInitialCodeCacheSize could be set to 300k
and the VM still starts up. However, I am not sure if it makes sense to
make MinimumInitialCodeCacheSize platform-dependent so that we can
potentially save 100k on Solaris. If there is a reason, please let me know.
Also note that the InitialCodeCacheSize must be > 0. The reason is that
otherwise the following assertion fails:
Internal Error
(/tmp/workspace/2-build-solaris-i586/jdk8/4767/hotspot/src/share/vm/memory/heap.cpp:50),
pid=27190, tid=2
# assert(0 <= beg && beg < _number_of_committed_segments) failed:
interval begin out of bounds
Testing:
With the current value of MinimumInitialCodeCacheSize, the VM starts up
on all Windows, Linux, and Solaris.
Note that we can still get exceptions (and the JVM cannot continue to
execute) if the value for CodeCacheMinimumFreeSpace is to small (in that
case, here is not enough space for adapters) .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20130620/e77c8242/attachment.html
More information about the hotspot-compiler-dev
mailing list