template <class T> void do_oop_work(T* p) { oop obj = oopDesc::load_decode_heap_oop_not_null(p); if (_young_gen->is_in_reserved(obj)) { assert(_card_table->addr_is_marked_precise(p), "Found unmarked precise oop"); _card_table->set_card_newgen(p); } }
template <class T> void do_oop_work(T* p) { oop obj = oopDesc::load_decode_heap_oop(p); if (_young_gen->is_in_reserved(obj) && !_card_table->addr_is_marked_imprecise(p)) { // Don't overwrite the first missing card mark if (_unmarked_addr == NULL) { _unmarked_addr = (HeapWord*)p; } } }
PSHeapSummary ParallelScavengeHeap::create_ps_heap_summary() { PSOldGen* old = old_gen(); HeapWord* old_committed_end = (HeapWord*)old->virtual_space()->committed_high_addr(); VirtualSpaceSummary old_summary(old->reserved().start(), old_committed_end, old->reserved().end()); SpaceSummary old_space(old->reserved().start(), old_committed_end, old->used_in_bytes()); PSYoungGen* young = young_gen(); VirtualSpaceSummary young_summary(young->reserved().start(), (HeapWord*)young->virtual_space()->committed_high_addr(), young->reserved().end()); MutableSpace* eden = young_gen()->eden_space(); SpaceSummary eden_space(eden->bottom(), eden->end(), eden->used_in_bytes()); MutableSpace* from = young_gen()->from_space(); SpaceSummary from_space(from->bottom(), from->end(), from->used_in_bytes()); MutableSpace* to = young_gen()->to_space(); SpaceSummary to_space(to->bottom(), to->end(), to->used_in_bytes()); VirtualSpaceSummary heap_summary = create_heap_space_summary(); return PSHeapSummary(heap_summary, used(), old_summary, old_space, young_summary, eden_space, from_space, to_space); }
size_t max_size() const { // Return current committed size of the from-space return _gen->from_space()->capacity_in_bytes(); }
size_t committed_in_bytes() { return _gen->from_space()->capacity_in_bytes(); }
size_t used_in_bytes() { return _gen->from_space()->used_in_bytes(); }
size_t max_size() const { // Eden's max_size = max_size of Young Gen - the current committed size of survivor spaces return _gen->max_size() - _gen->from_space()->capacity_in_bytes() - _gen->to_space()->capacity_in_bytes(); }