changeset 13778:0be9a42f28e7

PTXHotSpotBackend$1.getGraphFor() checks GPUOffload VM option (JBS:GRAAL-6)
author Doug Simon <doug.simon@oracle.com>
date Tue, 28 Jan 2014 12:31:31 +0100
parents b6cecbcfa503
children fc5e2c808a23
files graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXHotSpotBackend.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXHotSpotBackend.java	Tue Jan 28 12:27:39 2014 +0100
+++ b/graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXHotSpotBackend.java	Tue Jan 28 12:31:31 2014 +0100
@@ -155,7 +155,8 @@
             }
 
             private boolean canOffloadToGPU(ResolvedJavaMethod method) {
-                return method.getName().contains("lambda$") & method.isSynthetic();
+                HotSpotVMConfig config = getRuntime().getConfig();
+                return config.gpuOffload && method.getName().contains("lambda$") & method.isSynthetic();
             }
         };
     }