comparison src/share/vm/runtime/serviceThread.cpp @ 2341:216d916d5c12

7024234: 2/3 jvmti tests fail assert(!_oops_are_stale) failed: oops are stale on Win-AMD64 Summary: Move initialization of the '_instance' field to avoid race with ServiceThread start. Reviewed-by: dholmes, kamg, never, dsamersoff, ysr, coleenp, acorn
author dcubed
date Tue, 15 Mar 2011 06:35:10 -0700
parents bf8517f4e4d0
children 78542e2b5e35
comparison
equal deleted inserted replaced
2338:4f148718983e 2341:216d916d5c12
68 68
69 java_lang_Thread::set_thread(thread_oop(), thread); 69 java_lang_Thread::set_thread(thread_oop(), thread);
70 java_lang_Thread::set_priority(thread_oop(), NearMaxPriority); 70 java_lang_Thread::set_priority(thread_oop(), NearMaxPriority);
71 java_lang_Thread::set_daemon(thread_oop()); 71 java_lang_Thread::set_daemon(thread_oop());
72 thread->set_threadObj(thread_oop()); 72 thread->set_threadObj(thread_oop());
73 _instance = thread;
73 74
74 Threads::add(thread); 75 Threads::add(thread);
75 Thread::start(thread); 76 Thread::start(thread);
76
77 _instance = thread;
78 } 77 }
79 } 78 }
80 79
81 void ServiceThread::service_thread_entry(JavaThread* jt, TRAPS) { 80 void ServiceThread::service_thread_entry(JavaThread* jt, TRAPS) {
82 while (true) { 81 while (true) {