542
543 HeapWord* ParallelScavengeHeap::block_start(const void* addr) const {
544 if (young_gen()->is_in_reserved(addr)) {
545 assert(young_gen()->is_in(addr),
546 "addr should be in allocated part of young gen");
547 // called from os::print_location by find or VMError
548 if (Debugging || VMError::fatal_error_in_progress()) return NULL;
549 Unimplemented();
550 } else if (old_gen()->is_in_reserved(addr)) {
551 assert(old_gen()->is_in(addr),
552 "addr should be in allocated part of old gen");
553 return old_gen()->start_array()->object_start((HeapWord*)addr);
554 }
555 return 0;
556 }
557
558 bool ParallelScavengeHeap::block_is_obj(const HeapWord* addr) const {
559 return block_start(addr) == addr;
560 }
561
562 jlong ParallelScavengeHeap::millis_since_last_gc() {
563 return PSParallelCompact::millis_since_last_gc();
564 }
565
566 void ParallelScavengeHeap::prepare_for_verify() {
567 ensure_parsability(false); // no need to retire TLABs for verification
568 }
569
570 PSHeapSummary ParallelScavengeHeap::create_ps_heap_summary() {
571 PSOldGen* old = old_gen();
572 HeapWord* old_committed_end = (HeapWord*)old->virtual_space()->committed_high_addr();
573 VirtualSpaceSummary old_summary(old->reserved().start(), old_committed_end, old->reserved().end());
574 SpaceSummary old_space(old->reserved().start(), old_committed_end, old->used_in_bytes());
575
576 PSYoungGen* young = young_gen();
577 VirtualSpaceSummary young_summary(young->reserved().start(),
578 (HeapWord*)young->virtual_space()->committed_high_addr(), young->reserved().end());
579
580 MutableSpace* eden = young_gen()->eden_space();
581 SpaceSummary eden_space(eden->bottom(), eden->end(), eden->used_in_bytes());
582
583 MutableSpace* from = young_gen()->from_space();
584 SpaceSummary from_space(from->bottom(), from->end(), from->used_in_bytes());
585
|
542
543 HeapWord* ParallelScavengeHeap::block_start(const void* addr) const {
544 if (young_gen()->is_in_reserved(addr)) {
545 assert(young_gen()->is_in(addr),
546 "addr should be in allocated part of young gen");
547 // called from os::print_location by find or VMError
548 if (Debugging || VMError::fatal_error_in_progress()) return NULL;
549 Unimplemented();
550 } else if (old_gen()->is_in_reserved(addr)) {
551 assert(old_gen()->is_in(addr),
552 "addr should be in allocated part of old gen");
553 return old_gen()->start_array()->object_start((HeapWord*)addr);
554 }
555 return 0;
556 }
557
558 bool ParallelScavengeHeap::block_is_obj(const HeapWord* addr) const {
559 return block_start(addr) == addr;
560 }
561
562 void ParallelScavengeHeap::prepare_for_verify() {
563 ensure_parsability(false); // no need to retire TLABs for verification
564 }
565
566 PSHeapSummary ParallelScavengeHeap::create_ps_heap_summary() {
567 PSOldGen* old = old_gen();
568 HeapWord* old_committed_end = (HeapWord*)old->virtual_space()->committed_high_addr();
569 VirtualSpaceSummary old_summary(old->reserved().start(), old_committed_end, old->reserved().end());
570 SpaceSummary old_space(old->reserved().start(), old_committed_end, old->used_in_bytes());
571
572 PSYoungGen* young = young_gen();
573 VirtualSpaceSummary young_summary(young->reserved().start(),
574 (HeapWord*)young->virtual_space()->committed_high_addr(), young->reserved().end());
575
576 MutableSpace* eden = young_gen()->eden_space();
577 SpaceSummary eden_space(eden->bottom(), eden->end(), eden->used_in_bytes());
578
579 MutableSpace* from = young_gen()->from_space();
580 SpaceSummary from_space(from->bottom(), from->end(), from->used_in_bytes());
581
|