--- a/src/hotspot/share/runtime/thread.inline.hpp Tue Jan 15 15:56:41 2019 -0500
+++ b/src/hotspot/share/runtime/thread.inline.hpp Tue Jan 15 16:40:31 2019 -0500
@@ -233,4 +233,16 @@
OrderAccess::release_store((volatile jint *) &_terminated, (jint) _thread_terminated);
}
+// Allow tracking of class initialization monitor use
+inline void JavaThread::set_class_to_be_initialized(InstanceKlass* k) {
+ assert((k == NULL && _class_to_be_initialized != NULL) ||
+ (k != NULL && _class_to_be_initialized == NULL), "incorrect usage");
+ assert(this == Thread::current(), "Only the current thread can set this field");
+ _class_to_be_initialized = k;
+}
+
+inline InstanceKlass* JavaThread::class_to_be_initialized() const {
+ return _class_to_be_initialized;
+}
+
#endif // SHARE_RUNTIME_THREAD_INLINE_HPP