Mercurial > hg > truffle
comparison src/share/vm/graal/graalVMToCompiler.cpp @ 11596:91e5f927af63
Initial implementation of PTXRuntime (RegisterConfig, PTX description etc); guarded with new flag UseGPU. Specify -XX:+UseGPU to exercise this new implementation.
author | bharadwaj |
---|---|
date | Tue, 10 Sep 2013 22:39:50 -0400 |
parents | 516b93ccf7c9 |
children | 4f69a5189e77 |
comparison
equal
deleted
inserted
replaced
11595:003be97acdda | 11596:91e5f927af63 |
---|---|
22 */ | 22 */ |
23 | 23 |
24 #include "precompiled.hpp" | 24 #include "precompiled.hpp" |
25 #include "classfile/systemDictionary.hpp" | 25 #include "classfile/systemDictionary.hpp" |
26 #include "graal/graalVMToCompiler.hpp" | 26 #include "graal/graalVMToCompiler.hpp" |
27 #include "runtime/gpu.hpp" | |
27 | 28 |
28 // this is a *global* handle | 29 // this is a *global* handle |
29 jobject VMToCompiler::_graalRuntimePermObject = NULL; | 30 jobject VMToCompiler::_graalRuntimePermObject = NULL; |
30 jobject VMToCompiler::_vmToCompilerPermObject = NULL; | 31 jobject VMToCompiler::_vmToCompilerPermObject = NULL; |
31 Klass* VMToCompiler::_vmToCompilerPermKlass = NULL; | 32 Klass* VMToCompiler::_vmToCompilerPermKlass = NULL; |
58 } | 59 } |
59 | 60 |
60 Handle VMToCompiler::graalRuntime() { | 61 Handle VMToCompiler::graalRuntime() { |
61 if (JNIHandles::resolve(_graalRuntimePermObject) == NULL) { | 62 if (JNIHandles::resolve(_graalRuntimePermObject) == NULL) { |
62 #ifdef AMD64 | 63 #ifdef AMD64 |
63 Symbol* name = vmSymbols::com_oracle_graal_hotspot_amd64_AMD64HotSpotGraalRuntime(); | 64 Symbol* name = NULL; |
65 if (UseGPU && gpu::is_available() && gpu::has_gpu_linkage()) { | |
66 name = vmSymbols::com_oracle_graal_hotspot_ptx_PTXHotSpotGraalRuntime(); | |
67 } else { | |
68 name = vmSymbols::com_oracle_graal_hotspot_amd64_AMD64HotSpotGraalRuntime(); | |
69 } | |
64 #endif | 70 #endif |
65 #ifdef SPARC | 71 #ifdef SPARC |
66 Symbol* name = vmSymbols::com_oracle_graal_hotspot_sparc_SPARCHotSpotGraalRuntime(); | 72 Symbol* name = vmSymbols::com_oracle_graal_hotspot_sparc_SPARCHotSpotGraalRuntime(); |
67 #endif | 73 #endif |
68 KlassHandle klass = loadClass(name); | 74 KlassHandle klass = loadClass(name); |