mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 09:34:38 +02:00
6814943: getcpool001 catches more than one JvmtiThreadState problem
Mark field volatile, use membars, and change access order to close race Reviewed-by: dcubed, dholmes
This commit is contained in:
parent
ae65c6240f
commit
6308eab4d5
4 changed files with 13 additions and 11 deletions
|
@ -2253,12 +2253,14 @@ void JvmtiExport::post_vm_object_alloc(JavaThread *thread, oop object) {
|
|||
|
||||
void JvmtiExport::cleanup_thread(JavaThread* thread) {
|
||||
assert(JavaThread::current() == thread, "thread is not current");
|
||||
MutexLocker mu(JvmtiThreadState_lock);
|
||||
|
||||
|
||||
// This has to happen after the thread state is removed, which is
|
||||
// why it is not in post_thread_end_event like its complement
|
||||
// Maybe both these functions should be rolled into the posts?
|
||||
JvmtiEventController::thread_ended(thread);
|
||||
if (thread->jvmti_thread_state() != NULL) {
|
||||
// This has to happen after the thread state is removed, which is
|
||||
// why it is not in post_thread_end_event like its complement
|
||||
// Maybe both these functions should be rolled into the posts?
|
||||
JvmtiEventController::thread_ended(thread);
|
||||
}
|
||||
}
|
||||
|
||||
void JvmtiExport::oops_do(OopClosure* f) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue