8211909: JDWP Transport Listener: dt_socket thread crash
Reviewed-by: dcubed, dsamersoff
This commit is contained in:
parent
a40d0a0ee1
commit
dfcc6b3878
@ -1144,8 +1144,6 @@ JvmtiEnv::GetThreadInfo(jthread thread, jvmtiThreadInfo* info_ptr) {
|
||||
Handle context_class_loader;
|
||||
bool is_daemon;
|
||||
|
||||
{ MutexLocker mu(Threads_lock);
|
||||
|
||||
name = Handle(current_thread, java_lang_Thread::name(thread_obj()));
|
||||
priority = java_lang_Thread::priority(thread_obj());
|
||||
thread_group = Handle(current_thread, java_lang_Thread::threadGroup(thread_obj()));
|
||||
@ -1153,7 +1151,7 @@ JvmtiEnv::GetThreadInfo(jthread thread, jvmtiThreadInfo* info_ptr) {
|
||||
|
||||
oop loader = java_lang_Thread::context_class_loader(thread_obj());
|
||||
context_class_loader = Handle(current_thread, loader);
|
||||
}
|
||||
|
||||
{ const char *n;
|
||||
|
||||
if (name() != NULL) {
|
||||
@ -1402,13 +1400,10 @@ JvmtiEnv::GetThreadGroupInfo(jthreadGroup group, jvmtiThreadGroupInfo* info_ptr)
|
||||
bool is_daemon;
|
||||
ThreadPriority max_priority;
|
||||
|
||||
{ MutexLocker mu(Threads_lock);
|
||||
|
||||
name = java_lang_ThreadGroup::name(group_obj());
|
||||
parent_group = Handle(current_thread, java_lang_ThreadGroup::parent(group_obj()));
|
||||
is_daemon = java_lang_ThreadGroup::is_daemon(group_obj());
|
||||
max_priority = java_lang_ThreadGroup::maxPriority(group_obj());
|
||||
}
|
||||
|
||||
info_ptr->is_daemon = is_daemon;
|
||||
info_ptr->max_priority = max_priority;
|
||||
@ -1448,7 +1443,7 @@ JvmtiEnv::GetThreadGroupChildren(jthreadGroup group, jint* thread_count_ptr, jth
|
||||
Handle group_hdl(current_thread, group_obj);
|
||||
|
||||
{ // Cannot allow thread or group counts to change.
|
||||
MutexLocker mu(Threads_lock);
|
||||
ObjectLocker ol(group_hdl, current_thread);
|
||||
|
||||
nthreads = java_lang_ThreadGroup::nthreads(group_hdl());
|
||||
ngroups = java_lang_ThreadGroup::ngroups(group_hdl());
|
||||
@ -1496,9 +1491,8 @@ JvmtiEnv::GetThreadGroupChildren(jthreadGroup group, jint* thread_count_ptr, jth
|
||||
group_objs[i] = Handle(current_thread, group_obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
} // ThreadGroup unlocked here
|
||||
|
||||
// have to make global handles outside of Threads_lock
|
||||
*group_count_ptr = ngroups;
|
||||
*thread_count_ptr = nthreads;
|
||||
*threads_ptr = new_jthreadArray(nthreads, thread_objs);
|
||||
|
Loading…
x
Reference in New Issue
Block a user