Mercurial > hg > graal-jvmci-8
changeset 22463:d9f5c93a83d3
Move Java based CTW out of hotspot
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Mon, 24 Aug 2015 19:17:08 -0700 |
parents | 7a7dd51e7e0b |
children | 3fb432661d59 |
files | jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/CompileTheWorldMain.java src/share/vm/jvmci/jvmciCompiler.cpp src/share/vm/jvmci/jvmciCompiler.hpp src/share/vm/prims/jni.cpp src/share/vm/runtime/globals.hpp |
diffstat | 5 files changed, 34 insertions(+), 38 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/CompileTheWorldMain.java Mon Aug 24 19:17:08 2015 -0700 @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package jdk.internal.jvmci.hotspot; + +import jdk.internal.jvmci.compiler.Compiler; + +public class CompileTheWorldMain { + public static void main(String[] args) throws Throwable { + Compiler compiler = HotSpotJVMCIRuntime.runtime().getCompiler(); + compiler.compileTheWorld(); + } +}
--- a/src/share/vm/jvmci/jvmciCompiler.cpp Mon Aug 24 19:16:03 2015 -0700 +++ b/src/share/vm/jvmci/jvmciCompiler.cpp Mon Aug 24 19:17:08 2015 -0700 @@ -166,16 +166,3 @@ TRACE_jvmci_1("JVMCICompiler::print_timers"); tty->print_cr(" JVMCI code install time: %6.3f s", _codeInstallTimer.seconds()); } - -void JVMCICompiler::compile_the_world() { - HandleMark hm; - ResourceMark rm; - JVMCIRuntime::ensure_jvmci_class_loader_is_initialized(); - JavaThread* THREAD = JavaThread::current(); - Handle receiver = JVMCIRuntime::get_HotSpotJVMCIRuntime(); - TempNewSymbol compileTheWorld = SymbolTable::new_symbol("compileTheWorld", CHECK_ABORT); - JavaValue result(T_VOID); - JavaCallArguments args; - args.push_oop(receiver); - JavaCalls::call_special(&result, receiver->klass(), compileTheWorld, vmSymbols::void_method_signature(), &args, CHECK_ABORT); -}
--- a/src/share/vm/jvmci/jvmciCompiler.hpp Mon Aug 24 19:16:03 2015 -0700 +++ b/src/share/vm/jvmci/jvmciCompiler.hpp Mon Aug 24 19:17:08 2015 -0700 @@ -86,8 +86,6 @@ static void print_compilation_timers(); static elapsedTimer* codeInstallTimer() { return &_codeInstallTimer; } - - void compile_the_world(); }; #endif // SHARE_VM_JVMCI_JVMCI_COMPILER_HPP
--- a/src/share/vm/prims/jni.cpp Mon Aug 24 19:16:03 2015 -0700 +++ b/src/share/vm/prims/jni.cpp Mon Aug 24 19:17:08 2015 -0700 @@ -5209,28 +5209,11 @@ *vm = (JavaVM *)(&main_vm); *(JNIEnv**)penv = thread->jni_environment(); -#if INCLUDE_JVMCI - // We turn off CompileTheWorld so that compilation requests are not ignored during bootstrap or that JVMCI can be compiled by C1/C2. - bool doCTW = CompileTheWorld; - CompileTheWorld = false; -#endif - #ifdef COMPILERJVMCI // JVMCI is initialized on a CompilerThread if (BootstrapJVMCI) { JVMCICompiler::instance()->bootstrap(); } -#elif INCLUDE_JVMCI - if (doCTW) { - // required for hosted CTW. - CompilationPolicy::completed_vm_startup(); - } -#endif - -#if INCLUDE_JVMCI - if (doCTW) { - JVMCICompiler::instance()->compile_the_world(); - } #endif // Tracks the time application was running before GC
--- a/src/share/vm/runtime/globals.hpp Mon Aug 24 19:16:03 2015 -0700 +++ b/src/share/vm/runtime/globals.hpp Mon Aug 24 19:17:08 2015 -0700 @@ -2713,13 +2713,9 @@ "Delay invoking the compiler until main application class is " \ "loaded") \ \ - NOT_JVMCI(develop(bool, CompileTheWorld, false, \ + develop(bool, CompileTheWorld, false, \ "Compile all methods in all classes in bootstrap class path " \ - "(stress test)")) \ - \ - JVMCI_ONLY(product(bool, CompileTheWorld, false, \ - "Compile all methods in all classes in bootstrap class path " \ - "(stress test)")) \ + "(stress test)") \ \ develop(bool, CompileTheWorldPreloadClasses, true, \ "Preload all classes used by a class before start loading") \