src/share/vm/gc_implementation/g1/satbQueue.cpp

Print this page
rev 7653 : 8068883: Remove disabling of warning "C4355: 'this' : used in base member initializer list"


 180 
 181 void ObjPtrQueue::print(const char* name,
 182                         void** buf, size_t index, size_t sz) {
 183   gclog_or_tty->print_cr("  SATB BUFFER [%s] buf: "PTR_FORMAT" "
 184                          "index: "SIZE_FORMAT" sz: "SIZE_FORMAT,
 185                          name, buf, index, sz);
 186 }
 187 #endif // PRODUCT
 188 
 189 #ifdef ASSERT
 190 void ObjPtrQueue::verify_oops_in_buffer() {
 191   if (_buf == NULL) return;
 192   for (size_t i = _index; i < _sz; i += oopSize) {
 193     oop obj = (oop)_buf[byte_index_to_index((int)i)];
 194     assert(obj != NULL && obj->is_oop(true /* ignore mark word */),
 195            "Not an oop");
 196   }
 197 }
 198 #endif
 199 
 200 #ifdef _MSC_VER // the use of 'this' below gets a warning, make it go away
 201 #pragma warning( disable:4355 ) // 'this' : used in base member initializer list
 202 #endif // _MSC_VER
 203 
 204 SATBMarkQueueSet::SATBMarkQueueSet() :
 205   PtrQueueSet(), _closures(NULL),
 206   _shared_satb_queue(this, true /*perm*/) { }

 207 
 208 void SATBMarkQueueSet::initialize(Monitor* cbl_mon, Mutex* fl_lock,
 209                                   int process_completed_threshold,
 210                                   Mutex* lock) {
 211   PtrQueueSet::initialize(cbl_mon, fl_lock, process_completed_threshold, -1);
 212   _shared_satb_queue.set_lock(lock);
 213   _closures = NEW_C_HEAP_ARRAY(ObjectClosure*, ParallelGCThreads, mtGC);
 214 }
 215 
 216 void SATBMarkQueueSet::handle_zero_index_for_thread(JavaThread* t) {
 217   DEBUG_ONLY(t->satb_mark_queue().verify_oops_in_buffer();)
 218   t->satb_mark_queue().handle_zero_index();
 219 }
 220 
 221 #ifdef ASSERT
 222 void SATBMarkQueueSet::dump_active_states(bool expected_active) {
 223   gclog_or_tty->print_cr("Expected SATB active state: %s",
 224                          expected_active ? "ACTIVE" : "INACTIVE");
 225   gclog_or_tty->print_cr("Actual SATB active states:");
 226   gclog_or_tty->print_cr("  Queue set: %s", is_active() ? "ACTIVE" : "INACTIVE");




 180 
 181 void ObjPtrQueue::print(const char* name,
 182                         void** buf, size_t index, size_t sz) {
 183   gclog_or_tty->print_cr("  SATB BUFFER [%s] buf: "PTR_FORMAT" "
 184                          "index: "SIZE_FORMAT" sz: "SIZE_FORMAT,
 185                          name, buf, index, sz);
 186 }
 187 #endif // PRODUCT
 188 
 189 #ifdef ASSERT
 190 void ObjPtrQueue::verify_oops_in_buffer() {
 191   if (_buf == NULL) return;
 192   for (size_t i = _index; i < _sz; i += oopSize) {
 193     oop obj = (oop)_buf[byte_index_to_index((int)i)];
 194     assert(obj != NULL && obj->is_oop(true /* ignore mark word */),
 195            "Not an oop");
 196   }
 197 }
 198 #endif
 199 




 200 SATBMarkQueueSet::SATBMarkQueueSet() :
 201   PtrQueueSet(), _closures(NULL) {
 202   _shared_satb_queue = ObjPtrQueue(this, true /*perm*/);
 203 }
 204 
 205 void SATBMarkQueueSet::initialize(Monitor* cbl_mon, Mutex* fl_lock,
 206                                   int process_completed_threshold,
 207                                   Mutex* lock) {
 208   PtrQueueSet::initialize(cbl_mon, fl_lock, process_completed_threshold, -1);
 209   _shared_satb_queue.set_lock(lock);
 210   _closures = NEW_C_HEAP_ARRAY(ObjectClosure*, ParallelGCThreads, mtGC);
 211 }
 212 
 213 void SATBMarkQueueSet::handle_zero_index_for_thread(JavaThread* t) {
 214   DEBUG_ONLY(t->satb_mark_queue().verify_oops_in_buffer();)
 215   t->satb_mark_queue().handle_zero_index();
 216 }
 217 
 218 #ifdef ASSERT
 219 void SATBMarkQueueSet::dump_active_states(bool expected_active) {
 220   gclog_or_tty->print_cr("Expected SATB active state: %s",
 221                          expected_active ? "ACTIVE" : "INACTIVE");
 222   gclog_or_tty->print_cr("Actual SATB active states:");
 223   gclog_or_tty->print_cr("  Queue set: %s", is_active() ? "ACTIVE" : "INACTIVE");