src/hotspot/share/runtime/thread.cpp
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File
*** old/src/hotspot/share/runtime/thread.cpp	Thu Mar 28 11:23:21 2019
--- new/src/hotspot/share/runtime/thread.cpp	Thu Mar 28 11:23:21 2019

*** 115,125 **** --- 115,125 ---- #include "utilities/macros.hpp" #include "utilities/preserveException.hpp" #include "utilities/singleWriterSynchronizer.hpp" #include "utilities/vmError.hpp" #if INCLUDE_JVMCI ! #include "jvmci/jvmciCompiler.hpp" ! #include "jvmci/jvmciEnv.hpp" #include "jvmci/jvmciRuntime.hpp" #include "logging/logHandle.hpp" #endif #ifdef COMPILER1 #include "c1/c1_Compiler.hpp"
*** 1568,1587 **** --- 1568,1588 ---- bool jvmci_counters_include(JavaThread* thread) { return !JVMCICountersExcludeCompiler || !thread->is_Compiler_thread(); } ! void JavaThread::collect_counters(typeArrayOop array) { ! void JavaThread::collect_counters(JVMCIEnv* jvmci_env, JVMCIPrimitiveArray array) { if (JVMCICounterSize > 0) { JavaThreadIteratorWithHandle jtiwh; for (int i = 0; i < array->length(); i++) { array->long_at_put(i, _jvmci_old_thread_counters[i]); + int len = jvmci_env->get_length(array); + for (int i = 0; i < len; i++) { + jvmci_env->put_long_at(array, i, _jvmci_old_thread_counters[i]); } for (; JavaThread *tp = jtiwh.next(); ) { if (jvmci_counters_include(tp)) { ! for (int i = 0; i < array->length(); i++) { ! array->long_at_put(i, array->long_at(i) + tp->_jvmci_counters[i]); ! jvmci_env->put_long_at(array, i, jvmci_env->get_long_at(array, i) + tp->_jvmci_counters[i]); } } } } }
*** 3911,3924 **** --- 3912,3923 ---- #if defined(COMPILER1) || COMPILER2_OR_JVMCI #if INCLUDE_JVMCI bool force_JVMCI_intialization = false; if (EnableJVMCI) { // Initialize JVMCI eagerly when it is explicitly requested. ! // Or when JVMCILibDumpJNIConfig or JVMCIPrintProperties is enabled. // The JVMCI Java initialization code will read this flag and // do the printing if it's set. force_JVMCI_intialization = EagerJVMCI || JVMCIPrintProperties; + force_JVMCI_intialization = EagerJVMCI || JVMCIPrintProperties || JVMCILibDumpJNIConfig; if (!force_JVMCI_intialization) { // 8145270: Force initialization of JVMCI runtime otherwise requests for blocking // compilations via JVMCI will not actually block until JVMCI is initialized. force_JVMCI_intialization = UseJVMCICompiler && (!UseInterpreter || !BackgroundCompilation);
*** 3963,3973 **** --- 3962,3972 ---- } #endif #if INCLUDE_JVMCI if (force_JVMCI_intialization) { ! JVMCIRuntime::force_initialization(CHECK_JNI_ERR); ! JVMCI::initialize_compiler(CHECK_JNI_ERR); CompileBroker::compilation_init_phase2(); } #endif // Always call even when there are not JVMTI environments yet, since environments
*** 4263,4273 **** --- 4262,4272 ---- // the Shutdown class would have already been loaded // (Runtime.addShutdownHook will load it). JavaValue result(T_VOID); JavaCalls::call_static(&result, shutdown_klass, ! vmSymbols::shutdown_method_name(), ! vmSymbols::shutdown_name(), vmSymbols::void_method_signature(), THREAD); } CLEAR_PENDING_EXCEPTION; }

src/hotspot/share/runtime/thread.cpp
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File