< prev index next >

src/share/vm/prims/jni.cpp

Print this page

        

*** 30,39 **** --- 30,41 ---- #include "classfile/javaClasses.hpp" #include "classfile/symbolTable.hpp" #include "classfile/systemDictionary.hpp" #include "classfile/vmSymbols.hpp" #include "interpreter/linkResolver.hpp" + #include "jfr/jfrEvents.hpp" + #include "jfr/support/jfrThreadId.hpp" #include "utilities/macros.hpp" #include "utilities/ostream.hpp" #if INCLUDE_ALL_GCS #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" #endif // INCLUDE_ALL_GCS
*** 74,84 **** #include "runtime/signature.hpp" #include "runtime/thread.inline.hpp" #include "runtime/vm_operations.hpp" #include "services/memTracker.hpp" #include "services/runtimeService.hpp" - #include "trace/tracing.hpp" #include "utilities/defaultStream.hpp" #include "utilities/dtrace.hpp" #include "utilities/events.hpp" #include "utilities/histogram.hpp" #ifdef TARGET_OS_FAMILY_linux --- 76,85 ----
*** 5017,5026 **** --- 5018,5035 ---- // Returns the function structure struct JNINativeInterface_* jni_functions_nocheck() { return &jni_NativeInterface; } + static void post_thread_start_event(const JavaThread* jt) { + assert(jt != NULL, "invariant"); + EventThreadStart event; + if (event.should_commit()) { + event.set_thread(JFR_THREAD_ID(jt)); + event.commit(); + } + } // Invocation API // Forward declaration
*** 5239,5253 **** // Notify JVMTI if (JvmtiExport::should_post_thread_life()) { JvmtiExport::post_thread_start(thread); } ! EventThreadStart event; ! if (event.should_commit()) { ! event.set_javalangthread(java_lang_Thread::thread_id(thread->threadObj())); ! event.commit(); ! } #ifndef PRODUCT #ifndef CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED #define CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(f) f() #endif --- 5248,5258 ---- // Notify JVMTI if (JvmtiExport::should_post_thread_life()) { JvmtiExport::post_thread_start(thread); } ! post_thread_start_event(thread); #ifndef PRODUCT #ifndef CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED #define CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(f) f() #endif
*** 5454,5468 **** // Notify the debugger if (JvmtiExport::should_post_thread_life()) { JvmtiExport::post_thread_start(thread); } ! EventThreadStart event; ! if (event.should_commit()) { ! event.set_javalangthread(java_lang_Thread::thread_id(thread->threadObj())); ! event.commit(); ! } *(JNIEnv**)penv = thread->jni_environment(); // Now leaving the VM, so change thread_state. This is normally automatically taken care // of in the JVM_ENTRY. But in this situation we have to do it manually. Notice, that by --- 5459,5469 ---- // Notify the debugger if (JvmtiExport::should_post_thread_life()) { JvmtiExport::post_thread_start(thread); } ! post_thread_start_event(thread); *(JNIEnv**)penv = thread->jni_environment(); // Now leaving the VM, so change thread_state. This is normally automatically taken care // of in the JVM_ENTRY. But in this situation we have to do it manually. Notice, that by
< prev index next >