--- a/hotspot/src/share/vm/prims/jni.cpp Mon Jan 09 10:27:24 2012 +0100
+++ b/hotspot/src/share/vm/prims/jni.cpp Wed Jan 11 17:34:02 2012 -0500
@@ -48,6 +48,7 @@
#include "oops/typeArrayOop.hpp"
#include "prims/jni.h"
#include "prims/jniCheck.hpp"
+#include "prims/jniExport.hpp"
#include "prims/jniFastGetField.hpp"
#include "prims/jvm.h"
#include "prims/jvm_misc.hpp"
@@ -66,6 +67,8 @@
#include "runtime/signature.hpp"
#include "runtime/vm_operations.hpp"
#include "services/runtimeService.hpp"
+#include "trace/tracing.hpp"
+#include "trace/traceEventTypes.hpp"
#include "utilities/defaultStream.hpp"
#include "utilities/dtrace.hpp"
#include "utilities/events.hpp"
@@ -5139,6 +5142,11 @@
if (JvmtiExport::should_post_thread_life()) {
JvmtiExport::post_thread_start(thread);
}
+
+ EVENT_BEGIN(TraceEventThreadStart, event);
+ EVENT_COMMIT(event,
+ EVENT_SET(event, javalangthread, java_lang_Thread::thread_id(thread->threadObj())));
+
// Check if we should compile all classes on bootclasspath
NOT_PRODUCT(if (CompileTheWorld) ClassLoader::compile_the_world();)
// Since this is not a JVM_ENTRY we have to set the thread state manually before leaving.
@@ -5337,6 +5345,10 @@
JvmtiExport::post_thread_start(thread);
}
+ EVENT_BEGIN(TraceEventThreadStart, event);
+ EVENT_COMMIT(event,
+ EVENT_SET(event, javalangthread, java_lang_Thread::thread_id(thread->threadObj())));
+
*(JNIEnv**)penv = thread->jni_environment();
// Now leaving the VM, so change thread_state. This is normally automatically taken care
@@ -5464,8 +5476,7 @@
return ret;
}
- if (JvmtiExport::is_jvmti_version(version)) {
- ret = JvmtiExport::get_jvmti_interface(vm, penv, version);
+ if (JniExportedInterface::GetExportedInterface(vm, penv, version, &ret)) {
return ret;
}