Mercurial > hg > truffle
diff src/share/vm/runtime/arguments.cpp @ 17:ff5961f4c095
6395208: Elide autoboxing for calls to HashMap.get(int) and HashMap.get(long)
Reviewed-by: kvn, rasbold
author | never |
---|---|
date | Wed, 05 Dec 2007 09:01:00 -0800 |
parents | a61af66fc99e |
children | 8b6e49187640 |
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp Wed Dec 05 09:00:00 2007 -0800 +++ b/src/share/vm/runtime/arguments.cpp Wed Dec 05 09:01:00 2007 -0800 @@ -1254,6 +1254,22 @@ // Aggressive optimization flags -XX:+AggressiveOpts void Arguments::set_aggressive_opts_flags() { +#ifdef COMPILER2 + if (AggressiveOpts || !FLAG_IS_DEFAULT(AutoBoxCacheMax)) { + if (FLAG_IS_DEFAULT(EliminateAutoBox)) { + FLAG_SET_DEFAULT(EliminateAutoBox, true); + } + if (FLAG_IS_DEFAULT(AutoBoxCacheMax)) { + FLAG_SET_DEFAULT(AutoBoxCacheMax, 20000); + } + + // Feed the cache size setting into the JDK + char buffer[1024]; + sprintf(buffer, "java.lang.Integer.IntegerCache.high=%d", AutoBoxCacheMax); + add_property(buffer); + } +#endif + if (AggressiveOpts) { NOT_WINDOWS( // No measured benefit on Windows