diff src/share/vm/graal/graalVMToCompiler.cpp @ 11606:4f69a5189e77

Create runtime object based on GPUIL type newly added to gpu class; some code refactoring.
author bharadwaj
date Wed, 11 Sep 2013 17:02:40 -0400
parents 91e5f927af63
children 03fe11f5f186
line wrap: on
line diff
--- a/src/share/vm/graal/graalVMToCompiler.cpp	Wed Sep 11 21:04:24 2013 +0200
+++ b/src/share/vm/graal/graalVMToCompiler.cpp	Wed Sep 11 17:02:40 2013 -0400
@@ -62,8 +62,14 @@
   if (JNIHandles::resolve(_graalRuntimePermObject) == NULL) {
 #ifdef AMD64
     Symbol* name = NULL;
-    if (UseGPU && gpu::is_available() && gpu::has_gpu_linkage()) {
-      name = vmSymbols::com_oracle_graal_hotspot_ptx_PTXHotSpotGraalRuntime();
+    if (UseGPU) {
+      // Set name to PTXHotSpotRuntime if nVidia GPU was detected.
+      if ((gpu::get_target_il_type() == gpu::PTX) &&
+          gpu::is_available() && gpu::has_gpu_linkage()) {
+        name = vmSymbols::com_oracle_graal_hotspot_ptx_PTXHotSpotGraalRuntime();
+      }
+      // Set name to corresponding runtime classname for other
+      // supported GPU runtimes, here.
     } else {
       name = vmSymbols::com_oracle_graal_hotspot_amd64_AMD64HotSpotGraalRuntime();
     }