To replicate, save attached file as MapBenchmark.java, and:
% javac MapBenchmark.java
% java -server MapBenchmark java.util.HashMap 5 50000
Typical output follows.
--------
./gamma_gfast -Xbatch MapBenchmark java.util.HashMap 3 50000
# Executing gamma in fastdebug directory...
VM option '+PrintOpto'
VM option '+PrintOptoBailouts'
VM option '+PrintOptoInlining'
1 java.util.jar.Attributes$Name::isValid (45 bytes)
java.lang.String::length @ 1 (5 bytes)
java.lang.String::charAt @ 24 (33 bytes)
java.util.jar.Attributes$Name::isValid @ 27 (32 bytes)
java.util.jar.Attributes$Name::isAlpha @ 1 (30 bytes)
[OSR] 1! MapBenchmark::main @ 65 (189 bytes)
java.lang.Object::<init> @ 74 (1 bytes)
[OSR] 2! MapBenchmark::main @ 113 (189 bytes)
java.lang.Object::<init> @ 121 (1 bytes)
Construction : 3920
java.util.HashMap
2 MapBenchmark::test (1594 bytes)
java.lang.Error::<init> @ 49 (5 bytes)
MapBenchmark$TestTimer::getSize @ 71 (5 bytes)
java.lang.Error::<init> @ 117 (5 bytes)
MapBenchmark$TestTimer::getTime @ 138 (5 bytes)
java.lang.Error::<init> @ 158 (5 bytes)
java.lang.Error::<init> @ 200 (5 bytes)
MapBenchmark$TestTimer::getSize @ 222 (5 bytes)
java.lang.Error::<init> @ 276 (5 bytes)
MapBenchmark$TestTimer::getSize @ 298 (5 bytes)
java.lang.Error::<init> @ 318 (5 bytes)
java.lang.Error::<init> @ 363 (5 bytes)
MapBenchmark$TestTimer::getSize @ 385 (5 bytes)
java.lang.Error::<init> @ 405 (5 bytes)
java.lang.Error::<init> @ 446 (5 bytes)
MapBenchmark$TestTimer::getSize @ 468 (5 bytes)
java.lang.Error::<init> @ 512 (5 bytes)
MapBenchmark$TestTimer::getSize @ 534 (5 bytes)
java.lang.Error::<init> @ 580 (5 bytes)
MapBenchmark$TestTimer::getSize @ 602 (5 bytes)
java.lang.Error::<init> @ 646 (5 bytes)
MapBenchmark$TestTimer::getSize @ 668 (5 bytes)
MapBenchmark$TestTimer::getSize @ 703 (5 bytes)
3 java.util.HashMap::containsKey (14 bytes)
java.util.HashMap::getEntry @ 2 (87 bytes)
Inlining intrinsic virtual jint java.lang.Object.hashCode()
4* java.lang.Object::hashCode
[OSR] 3 MapBenchmark::test @ 32 (1594 bytes)
java.lang.Error::<init> @ 49 (5 bytes)
MapBenchmark$TestTimer::getSize @ 71 (5 bytes)
java.lang.Error::<init> @ 117 (5 bytes)
MapBenchmark$TestTimer::getTime @ 138 (5 bytes)
java.lang.Error::<init> @ 158 (5 bytes)
java.lang.Error::<init> @ 200 (5 bytes)
MapBenchmark$TestTimer::getSize @ 222 (5 bytes)
java.lang.Error::<init> @ 276 (5 bytes)
MapBenchmark$TestTimer::getSize @ 298 (5 bytes)
java.lang.Error::<init> @ 318 (5 bytes)
java.lang.Error::<init> @ 363 (5 bytes)
MapBenchmark$TestTimer::getSize @ 385 (5 bytes)
java.lang.Error::<init> @ 405 (5 bytes)
java.lang.Error::<init> @ 446 (5 bytes)
MapBenchmark$TestTimer::getSize @ 468 (5 bytes)
java.lang.Error::<init> @ 512 (5 bytes)
MapBenchmark$TestTimer::getSize @ 534 (5 bytes)
java.lang.Error::<init> @ 580 (5 bytes)
MapBenchmark$TestTimer::getSize @ 602 (5 bytes)
java.lang.Error::<init> @ 646 (5 bytes)
MapBenchmark$TestTimer::getSize @ 668 (5 bytes)
MapBenchmark$TestTimer::getSize @ 703 (5 bytes)
Failed to split live range 42
Warning, 2nd spill of L1061
Contains (empty) : 44680
[OSR] 4 java.util.HashMap::rehash @ 63 (119 bytes)
Failed to split live range 64
Failed to split live range 69
Failed to split live range 78
Failed to split live range 84
Warning, 2nd spill of L209
Warning, 2nd spill of L210
Warning, 2nd spill of L212
Warning, 2nd spill of L213
Warning, 2nd spill of L214
Warning, 2nd spill of L215
Failed to split live range 70
Failed to split live range 79
Failed to split live range 80
Warning, 2nd spill of L235
5 java.util.HashMap::put (175 bytes)
Inlining intrinsic virtual jint java.lang.Object.hashCode()
java.util.HashMap$Entry::recordAccess @ 89 (1 bytes)
java.util.HashMap::newEntry @ 169 (13 bytes)
java.util.HashMap$Entry::<init> @ 9 (26 bytes)
java.lang.Object::<init> @ 1 (1 bytes)
6 java.util.HashMap::rehash (119 bytes)
(half add) : 23640
Contains (absent, half): 440
Add (absent) : 12640
Add (present) : 460
ContainsKey (present) : 440
ContainsKey (absent) : 7160
7 java.util.HashMap::getEntry (87 bytes)
Inlining intrinsic virtual jint java.lang.Object.hashCode()
@ 64 java.lang.Object::equals >>TypeProfile = java/lang/Object (11 bytes)
java.lang.Object::equals @ 64 (11 bytes)
8 java.util.HashMap::get (19 bytes)
java.util.HashMap::getEntry @ 2 (87 bytes)
Inlining intrinsic virtual jint java.lang.Object.hashCode()
@ 64 java.lang.Object::equals >>TypeProfile = java/lang/Object (11 bytes)
java.lang.Object::equals @ 64 (11 bytes)
Get (present) : 3900
Get (absent) : 420
9 java.util.HashMap$HashIterator::hasNext (56 bytes)
10 java.util.AbstractMap::hashCode (38 bytes)
Inlining intrinsic virtual jint java.lang.Object.hashCode()
11 java.util.HashMap$HashIterator::nextEntry (103 bytes)
12 java.util.HashMap$Entry::hashCode (24 bytes)
Inlining intrinsic virtual jint java.lang.Object.hashCode()
[OSR] 5 java.util.AbstractMap::hashCode @ 15 (38 bytes)
Inlining intrinsic virtual jint java.lang.Object.hashCode()
13 java.util.HashMap$EntryIterator::next (5 bytes)
HashCode : 7440
14 java.util.HashMap$HashIterator::hasNext (56 bytes)
15 java.util.HashMap$KeyIterator::next (8 bytes)
16 java.util.HashMap$HashIterator::nextEntry (103 bytes)
[OSR] 6 MapBenchmark::test @ 741 (1594 bytes)
java.lang.Error::<init> @ 773 (5 bytes)
MapBenchmark$TestTimer::getSize @ 785 (5 bytes)
java.lang.Error::<init> @ 855 (5 bytes)
MapBenchmark$TestTimer::getSize @ 867 (5 bytes)
java.lang.Error::<init> @ 909 (5 bytes)
MapBenchmark$TestTimer::getSize @ 931 (5 bytes)
java.lang.Error::<init> @ 951 (5 bytes)
java.lang.Error::<init> @ 1015 (5 bytes)
MapBenchmark$TestTimer::getSize @ 1027 (5 bytes)
MapBenchmark$TestTimer::getSize @ 1085 (5 bytes)
java.lang.Error::<init> @ 1105 (5 bytes)
java.lang.Error::<init> @ 1181 (5 bytes)
java.lang.Error::<init> @ 1198 (5 bytes)
MapBenchmark$TestTimer::getSize @ 1210 (5 bytes)
java.lang.Error::<init> @ 1272 (6 bytes)
MapBenchmark$TestTimer::getSize @ 1294 (5 bytes)
java.lang.Error::<init> @ 1336 (6 bytes)
java.lang.Error::<init> @ 1381 (5 bytes)
MapBenchmark$TestTimer::getSize @ 1403 (5 bytes)
MapBenchmark$TestTimer::getSize @ 1438 (5 bytes)
java.lang.Error::<init> @ 1454 (5 bytes)
java.lang.Error::<init> @ 1491 (5 bytes)
MapBenchmark$TestTimer::getSize @ 1503 (5 bytes)
java.lang.Error::<init> @ 1565 (6 bytes)
MapBenchmark$TestTimer::getSize @ 1587 (5 bytes)
Warning, 2nd spill of L1265
Warning, 2nd spill of L1267
Failed to split live range 1265
Failed to split live range 1267
key Iteration : 27480
17 java.util.HashMap$EntryIterator::next (5 bytes)
entry Iteration : 840
18 java.util.HashMap::removeEntryForKey (141 bytes)
Inlining intrinsic virtual jint java.lang.Object.hashCode()
@ 67 java.lang.Object::equals >>TypeProfile = java/lang/Object (11 bytes)
java.lang.Object::equals @ 67 (11 bytes)
19 java.util.HashMap::remove (19 bytes)
Remove (half) : 6120
Contains (half) : 460
Add (half) : 520
20 java.util.HashMap$HashIterator::remove (163 bytes)
Iterator.remove : 2320
#
# HotSpot Virtual Machine Error, assertion failure
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# assert(captures(pc), "pc must point into original code for codebuffer")
#
# Error ID: /net/lukasiewicz/export/lukasiewicz1/jrose/bugfix/src/share/vm/runtime/threadCodeBuffer.hpp, 65 [ Patched ]
#
# Problematic Thread: prio=5 tid=0x38ff0 nid=0x1 runnable
#
Dumping core....
Abort
10.0u 0.0 0:12 80% (0t+0ds+0max)k 0i+0o (0maj+0min)pf 0swaps
--------
% javac MapBenchmark.java
% java -server MapBenchmark java.util.HashMap 5 50000
Typical output follows.
--------
./gamma_gfast -Xbatch MapBenchmark java.util.HashMap 3 50000
# Executing gamma in fastdebug directory...
VM option '+PrintOpto'
VM option '+PrintOptoBailouts'
VM option '+PrintOptoInlining'
1 java.util.jar.Attributes$Name::isValid (45 bytes)
java.lang.String::length @ 1 (5 bytes)
java.lang.String::charAt @ 24 (33 bytes)
java.util.jar.Attributes$Name::isValid @ 27 (32 bytes)
java.util.jar.Attributes$Name::isAlpha @ 1 (30 bytes)
[OSR] 1! MapBenchmark::main @ 65 (189 bytes)
java.lang.Object::<init> @ 74 (1 bytes)
[OSR] 2! MapBenchmark::main @ 113 (189 bytes)
java.lang.Object::<init> @ 121 (1 bytes)
Construction : 3920
java.util.HashMap
2 MapBenchmark::test (1594 bytes)
java.lang.Error::<init> @ 49 (5 bytes)
MapBenchmark$TestTimer::getSize @ 71 (5 bytes)
java.lang.Error::<init> @ 117 (5 bytes)
MapBenchmark$TestTimer::getTime @ 138 (5 bytes)
java.lang.Error::<init> @ 158 (5 bytes)
java.lang.Error::<init> @ 200 (5 bytes)
MapBenchmark$TestTimer::getSize @ 222 (5 bytes)
java.lang.Error::<init> @ 276 (5 bytes)
MapBenchmark$TestTimer::getSize @ 298 (5 bytes)
java.lang.Error::<init> @ 318 (5 bytes)
java.lang.Error::<init> @ 363 (5 bytes)
MapBenchmark$TestTimer::getSize @ 385 (5 bytes)
java.lang.Error::<init> @ 405 (5 bytes)
java.lang.Error::<init> @ 446 (5 bytes)
MapBenchmark$TestTimer::getSize @ 468 (5 bytes)
java.lang.Error::<init> @ 512 (5 bytes)
MapBenchmark$TestTimer::getSize @ 534 (5 bytes)
java.lang.Error::<init> @ 580 (5 bytes)
MapBenchmark$TestTimer::getSize @ 602 (5 bytes)
java.lang.Error::<init> @ 646 (5 bytes)
MapBenchmark$TestTimer::getSize @ 668 (5 bytes)
MapBenchmark$TestTimer::getSize @ 703 (5 bytes)
3 java.util.HashMap::containsKey (14 bytes)
java.util.HashMap::getEntry @ 2 (87 bytes)
Inlining intrinsic virtual jint java.lang.Object.hashCode()
4* java.lang.Object::hashCode
[OSR] 3 MapBenchmark::test @ 32 (1594 bytes)
java.lang.Error::<init> @ 49 (5 bytes)
MapBenchmark$TestTimer::getSize @ 71 (5 bytes)
java.lang.Error::<init> @ 117 (5 bytes)
MapBenchmark$TestTimer::getTime @ 138 (5 bytes)
java.lang.Error::<init> @ 158 (5 bytes)
java.lang.Error::<init> @ 200 (5 bytes)
MapBenchmark$TestTimer::getSize @ 222 (5 bytes)
java.lang.Error::<init> @ 276 (5 bytes)
MapBenchmark$TestTimer::getSize @ 298 (5 bytes)
java.lang.Error::<init> @ 318 (5 bytes)
java.lang.Error::<init> @ 363 (5 bytes)
MapBenchmark$TestTimer::getSize @ 385 (5 bytes)
java.lang.Error::<init> @ 405 (5 bytes)
java.lang.Error::<init> @ 446 (5 bytes)
MapBenchmark$TestTimer::getSize @ 468 (5 bytes)
java.lang.Error::<init> @ 512 (5 bytes)
MapBenchmark$TestTimer::getSize @ 534 (5 bytes)
java.lang.Error::<init> @ 580 (5 bytes)
MapBenchmark$TestTimer::getSize @ 602 (5 bytes)
java.lang.Error::<init> @ 646 (5 bytes)
MapBenchmark$TestTimer::getSize @ 668 (5 bytes)
MapBenchmark$TestTimer::getSize @ 703 (5 bytes)
Failed to split live range 42
Warning, 2nd spill of L1061
Contains (empty) : 44680
[OSR] 4 java.util.HashMap::rehash @ 63 (119 bytes)
Failed to split live range 64
Failed to split live range 69
Failed to split live range 78
Failed to split live range 84
Warning, 2nd spill of L209
Warning, 2nd spill of L210
Warning, 2nd spill of L212
Warning, 2nd spill of L213
Warning, 2nd spill of L214
Warning, 2nd spill of L215
Failed to split live range 70
Failed to split live range 79
Failed to split live range 80
Warning, 2nd spill of L235
5 java.util.HashMap::put (175 bytes)
Inlining intrinsic virtual jint java.lang.Object.hashCode()
java.util.HashMap$Entry::recordAccess @ 89 (1 bytes)
java.util.HashMap::newEntry @ 169 (13 bytes)
java.util.HashMap$Entry::<init> @ 9 (26 bytes)
java.lang.Object::<init> @ 1 (1 bytes)
6 java.util.HashMap::rehash (119 bytes)
(half add) : 23640
Contains (absent, half): 440
Add (absent) : 12640
Add (present) : 460
ContainsKey (present) : 440
ContainsKey (absent) : 7160
7 java.util.HashMap::getEntry (87 bytes)
Inlining intrinsic virtual jint java.lang.Object.hashCode()
@ 64 java.lang.Object::equals >>TypeProfile = java/lang/Object (11 bytes)
java.lang.Object::equals @ 64 (11 bytes)
8 java.util.HashMap::get (19 bytes)
java.util.HashMap::getEntry @ 2 (87 bytes)
Inlining intrinsic virtual jint java.lang.Object.hashCode()
@ 64 java.lang.Object::equals >>TypeProfile = java/lang/Object (11 bytes)
java.lang.Object::equals @ 64 (11 bytes)
Get (present) : 3900
Get (absent) : 420
9 java.util.HashMap$HashIterator::hasNext (56 bytes)
10 java.util.AbstractMap::hashCode (38 bytes)
Inlining intrinsic virtual jint java.lang.Object.hashCode()
11 java.util.HashMap$HashIterator::nextEntry (103 bytes)
12 java.util.HashMap$Entry::hashCode (24 bytes)
Inlining intrinsic virtual jint java.lang.Object.hashCode()
[OSR] 5 java.util.AbstractMap::hashCode @ 15 (38 bytes)
Inlining intrinsic virtual jint java.lang.Object.hashCode()
13 java.util.HashMap$EntryIterator::next (5 bytes)
HashCode : 7440
14 java.util.HashMap$HashIterator::hasNext (56 bytes)
15 java.util.HashMap$KeyIterator::next (8 bytes)
16 java.util.HashMap$HashIterator::nextEntry (103 bytes)
[OSR] 6 MapBenchmark::test @ 741 (1594 bytes)
java.lang.Error::<init> @ 773 (5 bytes)
MapBenchmark$TestTimer::getSize @ 785 (5 bytes)
java.lang.Error::<init> @ 855 (5 bytes)
MapBenchmark$TestTimer::getSize @ 867 (5 bytes)
java.lang.Error::<init> @ 909 (5 bytes)
MapBenchmark$TestTimer::getSize @ 931 (5 bytes)
java.lang.Error::<init> @ 951 (5 bytes)
java.lang.Error::<init> @ 1015 (5 bytes)
MapBenchmark$TestTimer::getSize @ 1027 (5 bytes)
MapBenchmark$TestTimer::getSize @ 1085 (5 bytes)
java.lang.Error::<init> @ 1105 (5 bytes)
java.lang.Error::<init> @ 1181 (5 bytes)
java.lang.Error::<init> @ 1198 (5 bytes)
MapBenchmark$TestTimer::getSize @ 1210 (5 bytes)
java.lang.Error::<init> @ 1272 (6 bytes)
MapBenchmark$TestTimer::getSize @ 1294 (5 bytes)
java.lang.Error::<init> @ 1336 (6 bytes)
java.lang.Error::<init> @ 1381 (5 bytes)
MapBenchmark$TestTimer::getSize @ 1403 (5 bytes)
MapBenchmark$TestTimer::getSize @ 1438 (5 bytes)
java.lang.Error::<init> @ 1454 (5 bytes)
java.lang.Error::<init> @ 1491 (5 bytes)
MapBenchmark$TestTimer::getSize @ 1503 (5 bytes)
java.lang.Error::<init> @ 1565 (6 bytes)
MapBenchmark$TestTimer::getSize @ 1587 (5 bytes)
Warning, 2nd spill of L1265
Warning, 2nd spill of L1267
Failed to split live range 1265
Failed to split live range 1267
key Iteration : 27480
17 java.util.HashMap$EntryIterator::next (5 bytes)
entry Iteration : 840
18 java.util.HashMap::removeEntryForKey (141 bytes)
Inlining intrinsic virtual jint java.lang.Object.hashCode()
@ 67 java.lang.Object::equals >>TypeProfile = java/lang/Object (11 bytes)
java.lang.Object::equals @ 67 (11 bytes)
19 java.util.HashMap::remove (19 bytes)
Remove (half) : 6120
Contains (half) : 460
Add (half) : 520
20 java.util.HashMap$HashIterator::remove (163 bytes)
Iterator.remove : 2320
#
# HotSpot Virtual Machine Error, assertion failure
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# assert(captures(pc), "pc must point into original code for codebuffer")
#
# Error ID: /net/lukasiewicz/export/lukasiewicz1/jrose/bugfix/src/share/vm/runtime/threadCodeBuffer.hpp, 65 [ Patched ]
#
# Problematic Thread: prio=5 tid=0x38ff0 nid=0x1 runnable
#
Dumping core....
Abort
10.0u 0.0 0:12 80% (0t+0ds+0max)k 0i+0o (0maj+0min)pf 0swaps
--------