mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
6395208: Elide autoboxing for calls to HashMap.get(int) and HashMap.get(long)
Reviewed-by: kvn, rasbold
This commit is contained in:
parent
5fa349cc42
commit
10c473e425
16 changed files with 540 additions and 67 deletions
|
@ -1254,6 +1254,22 @@ void Arguments::set_bytecode_flags() {
|
|||
|
||||
// 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue