changeset 12740:ad2434911b69

Disable Boxing substitutions when hprof is enabled
author Christos Kotselidis <christos.kotselidis@oracle.com>
date Sat, 09 Nov 2013 21:33:31 +0100
parents b699233403ad
children a5b5e1ebab81
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotReplacementsImpl.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotReplacementsImpl.java	Sat Nov 09 21:32:51 2013 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotReplacementsImpl.java	Sat Nov 09 21:33:31 2013 +0100
@@ -47,7 +47,11 @@
 
     @Override
     protected ResolvedJavaMethod registerMethodSubstitution(Member originalMethod, Method substituteMethod) {
-        if (substituteMethod.getDeclaringClass() == IntegerSubstitutions.class || substituteMethod.getDeclaringClass() == LongSubstitutions.class) {
+        if (substituteMethod.getDeclaringClass().getDeclaringClass() == BoxingSubstitutions.class) {
+            if (config.useHeapProfiler) {
+                return null;
+            }
+        } else if (substituteMethod.getDeclaringClass() == IntegerSubstitutions.class || substituteMethod.getDeclaringClass() == LongSubstitutions.class) {
             if (substituteMethod.getName().equals("bitCount")) {
                 if (!config.usePopCountInstruction) {
                     return null;