< prev index next >
src/share/vm/prims/jni.cpp
Print this page
*** 30,41 ****
--- 30,43 ----
#include "classfile/javaClasses.hpp"
#include "classfile/symbolTable.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/vmSymbols.hpp"
#include "interpreter/linkResolver.hpp"
+ #if INCLUDE_JFR
#include "jfr/jfrEvents.hpp"
#include "jfr/support/jfrThreadId.hpp"
+ #endif
#include "utilities/macros.hpp"
#include "utilities/ostream.hpp"
#if INCLUDE_ALL_GCS
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
#endif // INCLUDE_ALL_GCS
*** 5018,5035 ****
--- 5020,5039 ----
// Returns the function structure
struct JNINativeInterface_* jni_functions_nocheck() {
return &jni_NativeInterface;
}
+ #if INCLUDE_JFR
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();
}
}
+ #endif
// Invocation API
// Forward declaration
*** 5248,5258 ****
--- 5252,5264 ----
// Notify JVMTI
if (JvmtiExport::should_post_thread_life()) {
JvmtiExport::post_thread_start(thread);
}
+ #if INCLUDE_JFR
post_thread_start_event(thread);
+ #endif
#ifndef PRODUCT
#ifndef CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED
#define CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(f) f()
#endif
*** 5459,5469 ****
--- 5465,5477 ----
// Notify the debugger
if (JvmtiExport::should_post_thread_life()) {
JvmtiExport::post_thread_start(thread);
}
+ #if INCLUDE_JFR
post_thread_start_event(thread);
+ #endif
*(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 >