diff src/share/vm/graal/graalVMToCompiler.cpp @ 12456:f87c68d79f07

improved support for co-existing, multiple backends (GRAAL-363)
author Doug Simon <doug.simon@oracle.com>
date Thu, 17 Oct 2013 01:08:17 +0200
parents 03fe11f5f186
children 0dd597c6c9c7
line wrap: on
line diff
--- a/src/share/vm/graal/graalVMToCompiler.cpp	Thu Oct 17 01:05:13 2013 +0200
+++ b/src/share/vm/graal/graalVMToCompiler.cpp	Thu Oct 17 01:08:17 2013 +0200
@@ -53,32 +53,16 @@
   KlassHandle klass = loadClass(name);
 
   JavaValue result(T_OBJECT);
-  JavaCalls::call_static(&result, klass, vmSymbols::makeInstance_name(), vmSymbols::getTruffleRuntimeInstance_signature(), Thread::current());
+  JavaCalls::call_static(&result, klass, vmSymbols::makeInstance_name(), vmSymbols::makeInstance_signature(), Thread::current());
   check_pending_exception("Couldn't initialize GraalTruffleRuntime");
   return Handle((oop) result.get_jobject());
 }
 
 Handle VMToCompiler::graalRuntime() {
   if (JNIHandles::resolve(_graalRuntimePermObject) == NULL) {
-#ifdef AMD64
-    Symbol* name = NULL;
-    // Set name to PTXHotSpotRuntime if nVidia GPU was detected.
-    if (UseGPU && (gpu::get_target_il_type() == gpu::PTX) &&
-        gpu::is_available() && gpu::has_gpu_linkage()) {
-      name = vmSymbols::com_oracle_graal_hotspot_ptx_PTXHotSpotGraalRuntime();
-    }
-    
-    if (name == NULL) {
-      name = vmSymbols::com_oracle_graal_hotspot_amd64_AMD64HotSpotGraalRuntime();
-    }
-#endif
-#ifdef SPARC
-    Symbol* name = vmSymbols::com_oracle_graal_hotspot_sparc_SPARCHotSpotGraalRuntime();
-#endif
-    KlassHandle klass = loadClass(name);
-
+    KlassHandle klass = loadClass(vmSymbols::com_oracle_graal_hotspot_HotSpotGraalRuntime());
     JavaValue result(T_OBJECT);
-    JavaCalls::call_static(&result, klass, vmSymbols::makeInstance_name(), vmSymbols::getInstance_signature(), Thread::current());
+    JavaCalls::call_static(&result, klass, vmSymbols::runtime_name(), vmSymbols::runtime_signature(), Thread::current());
     check_pending_exception("Couldn't initialize HotSpotGraalRuntime");
     _graalRuntimePermObject = JNIHandles::make_global((oop) result.get_jobject());
   }