< prev index next >
src/share/vm/prims/jvmtiExport.cpp
Print this page
@@ -372,11 +372,11 @@
default:
return JNI_EVERSION; // unsupported major version number
}
if (JvmtiEnv::get_phase() == JVMTI_PHASE_LIVE) {
- JavaThread* current_thread = (JavaThread*) ThreadLocalStorage::thread();
+ JavaThread* current_thread = JavaThread::current();
// transition code: native to VM
ThreadInVMfromNative __tiv(current_thread);
VM_ENTRY_BASE(jvmtiEnv*, JvmtiExport::get_jvmti_interface, current_thread)
debug_only(VMNativeEntryWrapper __vew;)
@@ -1899,11 +1899,11 @@
collector->register_stub(name, code_begin, code_end);
}
// Collect all the vm internally allocated objects which are visible to java world
void JvmtiExport::record_vm_internal_object_allocation(oop obj) {
- Thread* thread = ThreadLocalStorage::thread();
+ Thread* thread = Thread::current_or_null();
if (thread != NULL && thread->is_Java_thread()) {
// Can not take safepoint here.
No_Safepoint_Verifier no_sfpt;
// Can not take safepoint here so can not use state_for to get
// jvmti thread state.
@@ -2434,11 +2434,11 @@
NoJvmtiVMObjectAllocMark::NoJvmtiVMObjectAllocMark() : _collector(NULL) {
// a no-op if VMObjectAlloc event is not enabled
if (!JvmtiExport::should_post_vm_object_alloc()) {
return;
}
- Thread* thread = ThreadLocalStorage::thread();
+ Thread* thread = Thread::current_or_null();
if (thread != NULL && thread->is_Java_thread()) {
JavaThread* current_thread = (JavaThread*)thread;
JvmtiThreadState *state = current_thread->jvmti_thread_state();
if (state != NULL) {
JvmtiVMObjectAllocEventCollector *collector;
< prev index next >