--- a/hotspot/src/share/vm/gc_implementation/g1/satbQueue.hpp Mon Mar 22 02:40:53 2010 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/satbQueue.hpp Thu Mar 18 12:14:59 2010 -0400
@@ -29,8 +29,7 @@
class ObjPtrQueue: public PtrQueue {
public:
ObjPtrQueue(PtrQueueSet* qset_, bool perm = false) :
- PtrQueue(qset_, perm)
- {}
+ PtrQueue(qset_, perm, qset_->is_active()) { }
// Apply the closure to all elements, and reset the index to make the
// buffer empty.
void apply_closure(ObjectClosure* cl);
@@ -55,6 +54,9 @@
// is ignored.
bool apply_closure_to_completed_buffer_work(bool par, int worker);
+#ifdef ASSERT
+ void dump_active_values(JavaThread* first, bool expected_active);
+#endif // ASSERT
public:
SATBMarkQueueSet();
@@ -65,9 +67,11 @@
static void handle_zero_index_for_thread(JavaThread* t);
- // Apply "set_active(b)" to all thread tloq's. Should be called only
- // with the world stopped.
- void set_active_all_threads(bool b);
+ // Apply "set_active(b)" to all Java threads' SATB queues. It should be
+ // called only with the world stopped. The method will assert that the
+ // SATB queues of all threads it visits, as well as the SATB queue
+ // set itself, has an active value same as expected_active.
+ void set_active_all_threads(bool b, bool expected_active);
// Register "blk" as "the closure" for all queues. Only one such closure
// is allowed. The "apply_closure_to_completed_buffer" method will apply