Mercurial > hg > graal-jvmci-8
diff src/share/vm/runtime/compilationPolicy.cpp @ 14526:10c4df6767c4
removed GPU offload interaction with compilation policy
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 13 Mar 2014 17:48:44 +0100 |
parents | d8041d695d19 |
children | 4ca6dc0799b6 |
line wrap: on
line diff
--- a/src/share/vm/runtime/compilationPolicy.cpp Thu Mar 13 17:47:44 2014 +0100 +++ b/src/share/vm/runtime/compilationPolicy.cpp Thu Mar 13 17:48:44 2014 +0100 @@ -105,8 +105,6 @@ if (m->has_compiled_code()) return false; // already compiled - if (CompilationPolicy::can_be_offloaded_to_gpu(m)) return true; - if (!can_be_compiled(m, comp_level)) return false; return !UseInterpreter || // must compile all methods @@ -161,42 +159,6 @@ return (result && can_be_compiled(m, comp_level)); } -bool CompilationPolicy::can_be_offloaded_to_gpu(methodHandle m) { -#ifdef GRAAL - if (GPUOffload && gpu::initialized_gpus() > 0) { - // Check if this method can be off-loaded to GPU. - if (m->is_synthetic()) { - // A lambda method is a synthetic method. - Symbol * klass_name = m->method_holder()->name(); - Symbol * method_name = m->name(); - { - ResourceMark rm; - if (klass_name != NULL) { - const char* javaClass = "java/"; - // Exclude java library classes - for now - if (strncmp(klass_name->as_C_string(), javaClass, strlen(javaClass))) { - if (method_name != NULL) { - const char* lambdaPrefix = "lambda$"; - char* methodPrefix = strstr(method_name->as_C_string(), lambdaPrefix); - if (methodPrefix != 0) { - if ((strncmp(lambdaPrefix, methodPrefix, strlen(lambdaPrefix)) == 0)) { - if (TraceGPUInteraction) { - char buf[O_BUFLEN]; - tty->print_cr("Selected lambda method %s for GPU offload", m->name_and_sig_as_C_string(buf, O_BUFLEN)); - } - return true; - } - } - } - } - } - } - } - } -#endif - return false; -} - bool CompilationPolicy::is_compilation_enabled() { // NOTE: CompileBroker::should_compile_new_jobs() checks for UseCompiler return !delay_compilation_during_startup() && CompileBroker::should_compile_new_jobs();