comparison src/share/vm/gc_implementation/shared/concurrentGCThread.cpp @ 1842:6e0aac35bfa9

6980838: G1: guarantee(false) failed: thread has an unexpected active value in its SATB queue Summary: Under certain circumstances a safepoint could happen between a JavaThread object being created and that object being added to the Java threads list. This could cause the active field of that thread's SATB queue to get out-of-sync with respect to the other Java threads. The solution is to activate the SATB queue, when necessary, before adding the thread to the Java threads list, not when the JavaThread object is created. The changeset also includes a small fix to rename the surrogate locker thread from "Surrogate Locker Thread (CMS)" to "Surrogate Locker Thread (Concurrent GC)" since it's also used in G1. Reviewed-by: iveresov, ysr, johnc, jcoomes
author tonyp
date Fri, 01 Oct 2010 16:43:05 -0400
parents c18cbe5936b8
children f95d63e2154a
comparison
equal deleted inserted replaced
1841:32a1f7bf0c21 1842:6e0aac35bfa9
183 SystemDictionary::resolve_or_fail(vmSymbolHandles::java_lang_Thread(), 183 SystemDictionary::resolve_or_fail(vmSymbolHandles::java_lang_Thread(),
184 true, CHECK_NULL); 184 true, CHECK_NULL);
185 instanceKlassHandle klass (THREAD, k); 185 instanceKlassHandle klass (THREAD, k);
186 instanceHandle thread_oop = klass->allocate_instance_handle(CHECK_NULL); 186 instanceHandle thread_oop = klass->allocate_instance_handle(CHECK_NULL);
187 187
188 const char thread_name[] = "Surrogate Locker Thread (CMS)"; 188 const char thread_name[] = "Surrogate Locker Thread (Concurrent GC)";
189 Handle string = java_lang_String::create_from_str(thread_name, CHECK_NULL); 189 Handle string = java_lang_String::create_from_str(thread_name, CHECK_NULL);
190 190
191 // Initialize thread_oop to put it into the system threadGroup 191 // Initialize thread_oop to put it into the system threadGroup
192 Handle thread_group (THREAD, Universe::system_thread_group()); 192 Handle thread_group (THREAD, Universe::system_thread_group());
193 JavaValue result(T_VOID); 193 JavaValue result(T_VOID);