< prev index next >
src/share/vm/prims/jni.cpp
Print this page
*** 74,83 ****
--- 74,84 ----
#include "runtime/thread.inline.hpp"
#include "runtime/vm_operations.hpp"
#include "services/memTracker.hpp"
#include "services/runtimeService.hpp"
#include "trace/tracing.hpp"
+ #include "evtrace/traceEvents.hpp"
#include "utilities/defaultStream.hpp"
#include "utilities/dtrace.hpp"
#include "utilities/events.hpp"
#include "utilities/histogram.hpp"
#ifdef TARGET_OS_FAMILY_linux
*** 5225,5234 ****
--- 5226,5239 ----
*(JNIEnv**)penv = thread->jni_environment();
// Tracks the time application was running before GC
RuntimeService::record_application_start();
+ if (EnableEventTracing) {
+ TraceEvents::write_thread_start();
+ }
+
// Notify JVMTI
if (JvmtiExport::should_post_thread_life()) {
JvmtiExport::post_thread_start(thread);
}
*** 5440,5449 ****
--- 5445,5458 ----
// Set java thread status.
java_lang_Thread::set_thread_status(thread->threadObj(),
java_lang_Thread::RUNNABLE);
+ if (EnableEventTracing) {
+ TraceEvents::write_thread_start();
+ }
+
// Notify the debugger
if (JvmtiExport::should_post_thread_life()) {
JvmtiExport::post_thread_start(thread);
}
*** 5534,5543 ****
--- 5543,5556 ----
// Safepoint support. Have to do call-back to safepoint code, if in the
// middel of a safepoint operation
ThreadStateTransition::transition_from_native(thread, _thread_in_vm);
+ if (EnableEventTracing) {
+ TraceEvents::write_thread_exit();
+ }
+
// XXX: Note that JavaThread::exit() call below removes the guards on the
// stack pages set up via enable_stack_{red,yellow}_zone() calls
// above in jni_AttachCurrentThread. Unfortunately, while the setting
// of the guards is visible in jni_AttachCurrentThread above,
// the removal of the guards is buried below in JavaThread::exit()
< prev index next >