Example #1
0
void G1SATBCardTableModRefBS::enqueue(oop pre_val) {
    assert(pre_val->is_oop_or_null(true), "Error");
    if (!JavaThread::satb_mark_queue_set().is_active()) return;
    Thread* thr = Thread::current();
    if (thr->is_Java_thread()) {
        JavaThread* jt = (JavaThread*)thr;
        jt->satb_mark_queue().enqueue(pre_val);
    } else {
        MutexLocker x(Shared_SATB_Q_lock);
        JavaThread::satb_mark_queue_set().shared_satb_queue()->enqueue(pre_val);
    }
}
void ArtaObjects::oop_print_xml_on(oop o, xmlBuffer *xb, bool ref) {
  if (ref) {
    // objref printing
assert(o->is_oop_or_null(),"o is invalid");
    if (o == NULL) {
      xmlElement xe(xb, "object_ref");
      null_print_xml_on(xb);
      return;
    }
  } else {
    // object printing
assert(o!=NULL,"o is NULL");
assert(o->is_oop(),"o an invalid oop");
  }
  o->print_xml_on(xb, ref);
}
Example #3
0
inline void G1CMTask::deal_with_reference(oop obj) {
  increment_refs_reached();

  HeapWord* objAddr = (HeapWord*) obj;
  assert(obj->is_oop_or_null(true /* ignore mark word */), "Expected an oop or NULL at " PTR_FORMAT, p2i(obj));
  if (_g1h->is_in_g1_reserved(objAddr)) {
    assert(obj != NULL, "null check is implicit");
    if (!_nextMarkBitMap->isMarked(objAddr)) {
      // Only get the containing region if the object is not marked on the
      // bitmap (otherwise, it's a waste of time since we won't do
      // anything with it).
      HeapRegion* hr = _g1h->heap_region_containing(obj);
      if (!hr->obj_allocated_since_next_marking(obj)) {
        make_reference_grey(obj);
      }
    }
  }
}