changeset 18631:12bad81babff

[AMD64] fix concurrency issues in register configuration caching (Use concurrenthashmap)
author Stefan Anzinger <stefan.a.anzinger@oracle.com>
date Thu, 04 Dec 2014 23:33:24 +0100
parents 7cd79d18f71a
children 5ec45cb4bf22
files graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotRegisterConfig.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotRegisterConfig.java	Thu Dec 04 23:30:52 2014 +0100
+++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotRegisterConfig.java	Thu Dec 04 23:33:24 2014 +0100
@@ -26,6 +26,7 @@
 import static com.oracle.graal.compiler.common.GraalOptions.*;
 
 import java.util.*;
+import java.util.concurrent.*;
 
 import com.oracle.graal.amd64.*;
 import com.oracle.graal.api.code.*;
@@ -51,7 +52,7 @@
 
     private final boolean allAllocatableAreCallerSaved;
 
-    private final HashMap<PlatformKind, Register[]> categorized = new HashMap<>();
+    private final Map<PlatformKind, Register[]> categorized = new ConcurrentHashMap<>();
 
     private final RegisterAttributes[] attributesMap;