1.1 --- a/src/share/vm/prims/jni.cpp Mon Jan 09 10:27:24 2012 +0100 1.2 +++ b/src/share/vm/prims/jni.cpp Wed Jan 11 17:34:02 2012 -0500 1.3 @@ -48,6 +48,7 @@ 1.4 #include "oops/typeArrayOop.hpp" 1.5 #include "prims/jni.h" 1.6 #include "prims/jniCheck.hpp" 1.7 +#include "prims/jniExport.hpp" 1.8 #include "prims/jniFastGetField.hpp" 1.9 #include "prims/jvm.h" 1.10 #include "prims/jvm_misc.hpp" 1.11 @@ -66,6 +67,8 @@ 1.12 #include "runtime/signature.hpp" 1.13 #include "runtime/vm_operations.hpp" 1.14 #include "services/runtimeService.hpp" 1.15 +#include "trace/tracing.hpp" 1.16 +#include "trace/traceEventTypes.hpp" 1.17 #include "utilities/defaultStream.hpp" 1.18 #include "utilities/dtrace.hpp" 1.19 #include "utilities/events.hpp" 1.20 @@ -5139,6 +5142,11 @@ 1.21 if (JvmtiExport::should_post_thread_life()) { 1.22 JvmtiExport::post_thread_start(thread); 1.23 } 1.24 + 1.25 + EVENT_BEGIN(TraceEventThreadStart, event); 1.26 + EVENT_COMMIT(event, 1.27 + EVENT_SET(event, javalangthread, java_lang_Thread::thread_id(thread->threadObj()))); 1.28 + 1.29 // Check if we should compile all classes on bootclasspath 1.30 NOT_PRODUCT(if (CompileTheWorld) ClassLoader::compile_the_world();) 1.31 // Since this is not a JVM_ENTRY we have to set the thread state manually before leaving. 1.32 @@ -5337,6 +5345,10 @@ 1.33 JvmtiExport::post_thread_start(thread); 1.34 } 1.35 1.36 + EVENT_BEGIN(TraceEventThreadStart, event); 1.37 + EVENT_COMMIT(event, 1.38 + EVENT_SET(event, javalangthread, java_lang_Thread::thread_id(thread->threadObj()))); 1.39 + 1.40 *(JNIEnv**)penv = thread->jni_environment(); 1.41 1.42 // Now leaving the VM, so change thread_state. This is normally automatically taken care 1.43 @@ -5464,8 +5476,7 @@ 1.44 return ret; 1.45 } 1.46 1.47 - if (JvmtiExport::is_jvmti_version(version)) { 1.48 - ret = JvmtiExport::get_jvmti_interface(vm, penv, version); 1.49 + if (JniExportedInterface::GetExportedInterface(vm, penv, version, &ret)) { 1.50 return ret; 1.51 } 1.52