Exemplo n.º 1
0
 uint max_regions(InCSetState dest) const {
   switch (dest.value()) {
     case InCSetState::Young:
       return _max_survivor_regions;
     case InCSetState::Old:
       return REGIONS_UNLIMITED;
     default:
       assert(false, "Unknown dest state: " CSETSTATE_FORMAT, dest.value());
       break;
   }
   // keep some compilers happy
   return 0;
 }
Exemplo n.º 2
0
void G1ParScanThreadState::report_promotion_event(InCSetState const dest_state,
        oop const old, size_t word_sz, uint age,
        HeapWord * const obj_ptr,
        const AllocationContext_t context) const {
    G1PLAB* alloc_buf = _plab_allocator->alloc_buffer(dest_state, context);
    if (alloc_buf->contains(obj_ptr)) {
        _g1h->_gc_tracer_stw->report_promotion_in_new_plab_event(old->klass(), word_sz, age,
                dest_state.value() == InCSetState::Old,
                alloc_buf->word_sz());
    } else {
        _g1h->_gc_tracer_stw->report_promotion_outside_plab_event(old->klass(), word_sz, age,
                dest_state.value() == InCSetState::Old);
    }
}