< prev index next >

src/share/vm/prims/jvm.cpp

Print this page

        

*** 35,44 **** --- 35,45 ---- #include "classfile/systemDictionaryShared.hpp" #endif #include "classfile/vmSymbols.hpp" #include "gc_interface/collectedHeap.inline.hpp" #include "interpreter/bytecode.hpp" + #include "jfr/jfrEvents.hpp" #include "memory/oopFactory.hpp" #include "memory/referenceType.hpp" #include "memory/universe.inline.hpp" #include "oops/fieldStreams.hpp" #include "oops/instanceKlass.hpp"
*** 65,75 **** #include "runtime/vframe.hpp" #include "runtime/vm_operations.hpp" #include "services/attachListener.hpp" #include "services/management.hpp" #include "services/threadService.hpp" - #include "trace/tracing.hpp" #include "utilities/copy.hpp" #include "utilities/defaultStream.hpp" #include "utilities/dtrace.hpp" #include "utilities/events.hpp" #include "utilities/histogram.hpp" --- 66,75 ----
*** 441,450 **** --- 441,460 ---- before_exit(thread); vm_exit(code); JVM_END + JVM_ENTRY_NO_ENV(void, JVM_BeforeHalt()) + JVMWrapper("JVM_BeforeHalt"); + EventShutdown event; + if (event.should_commit()) { + event.set_reason("Shutdown requested from Java"); + event.commit(); + } + JVM_END + + JVM_ENTRY_NO_ENV(void, JVM_Halt(jint code)) before_exit(thread); vm_exit(code); JVM_END
*** 3274,3283 **** --- 3284,3299 ---- } else { os::yield(); } JVM_END + static void post_thread_sleep_event(EventThreadSleep* event, jlong millis) { + assert(event != NULL, "invariant"); + assert(event->should_commit(), "invariant"); + event->set_time(millis); + event->commit(); + } JVM_ENTRY(void, JVM_Sleep(JNIEnv* env, jclass threadClass, jlong millis)) JVMWrapper("JVM_Sleep"); if (millis < 0) {
*** 3320,3331 **** if (os::sleep(thread, millis, true) == OS_INTRPT) { // An asynchronous exception (e.g., ThreadDeathException) could have been thrown on // us while we were sleeping. We do not overwrite those. if (!HAS_PENDING_EXCEPTION) { if (event.should_commit()) { ! event.set_time(millis); ! event.commit(); } #ifndef USDT2 HS_DTRACE_PROBE1(hotspot, thread__sleep__end,1); #else /* USDT2 */ HOTSPOT_THREAD_SLEEP_END( --- 3336,3346 ---- if (os::sleep(thread, millis, true) == OS_INTRPT) { // An asynchronous exception (e.g., ThreadDeathException) could have been thrown on // us while we were sleeping. We do not overwrite those. if (!HAS_PENDING_EXCEPTION) { if (event.should_commit()) { ! post_thread_sleep_event(&event, millis); } #ifndef USDT2 HS_DTRACE_PROBE1(hotspot, thread__sleep__end,1); #else /* USDT2 */ HOTSPOT_THREAD_SLEEP_END(
*** 3337,3348 **** } } thread->osthread()->set_state(old_state); } if (event.should_commit()) { ! event.set_time(millis); ! event.commit(); } #ifndef USDT2 HS_DTRACE_PROBE1(hotspot, thread__sleep__end,0); #else /* USDT2 */ HOTSPOT_THREAD_SLEEP_END( --- 3352,3362 ---- } } thread->osthread()->set_state(old_state); } if (event.should_commit()) { ! post_thread_sleep_event(&event, millis); } #ifndef USDT2 HS_DTRACE_PROBE1(hotspot, thread__sleep__end,0); #else /* USDT2 */ HOTSPOT_THREAD_SLEEP_END(
< prev index next >