< prev index next >

src/hotspot/share/gc/z/zHeap.cpp

Print this page




 488 ZServiceabilityCounters* ZHeap::serviceability_counters() {
 489   return _serviceability.counters();
 490 }
 491 
 492 void ZHeap::print_on(outputStream* st) const {
 493   st->print_cr(" ZHeap           used " SIZE_FORMAT "M, capacity " SIZE_FORMAT "M, max capacity " SIZE_FORMAT "M",
 494                used() / M,
 495                capacity() / M,
 496                max_capacity() / M);
 497   MetaspaceUtils::print_on(st);
 498 }
 499 
 500 void ZHeap::print_extended_on(outputStream* st) const {
 501   print_on(st);
 502   st->cr();
 503 
 504   // Do not allow pages to be deleted
 505   _page_allocator.enable_deferred_delete();
 506 
 507   // Print all pages

 508   ZPageTableIterator iter(&_page_table);
 509   for (ZPage* page; iter.next(&page);) {
 510     page->print_on(st);
 511   }
 512 
 513   // Allow pages to be deleted
 514   _page_allocator.enable_deferred_delete();
 515 
 516   st->cr();
 517 }
 518 
 519 bool ZHeap::print_location(outputStream* st, uintptr_t addr) const {
 520   if (LocationPrinter::is_valid_obj((void*)addr)) {
 521     st->print(PTR_FORMAT " is a %s oop: ", addr, ZAddress::is_good(addr) ? "good" : "bad");
 522     ZOop::from_address(addr)->print_on(st);
 523     return true;
 524   }
 525 
 526   return false;
 527 }
 528 
 529 void ZHeap::verify() {
 530   // Heap verification can only be done between mark end and
 531   // relocate start. This is the only window where all oop are
 532   // good and the whole heap is in a consistent state.
 533   guarantee(ZGlobalPhase == ZPhaseMarkCompleted, "Invalid phase");
 534 
 535   ZVerify::after_weak_processing();
 536 }


 488 ZServiceabilityCounters* ZHeap::serviceability_counters() {
 489   return _serviceability.counters();
 490 }
 491 
 492 void ZHeap::print_on(outputStream* st) const {
 493   st->print_cr(" ZHeap           used " SIZE_FORMAT "M, capacity " SIZE_FORMAT "M, max capacity " SIZE_FORMAT "M",
 494                used() / M,
 495                capacity() / M,
 496                max_capacity() / M);
 497   MetaspaceUtils::print_on(st);
 498 }
 499 
 500 void ZHeap::print_extended_on(outputStream* st) const {
 501   print_on(st);
 502   st->cr();
 503 
 504   // Do not allow pages to be deleted
 505   _page_allocator.enable_deferred_delete();
 506 
 507   // Print all pages
 508   st->print_cr("ZGC Page Table:");
 509   ZPageTableIterator iter(&_page_table);
 510   for (ZPage* page; iter.next(&page);) {
 511     page->print_on(st);
 512   }
 513 
 514   // Allow pages to be deleted
 515   _page_allocator.enable_deferred_delete();


 516 }
 517 
 518 bool ZHeap::print_location(outputStream* st, uintptr_t addr) const {
 519   if (LocationPrinter::is_valid_obj((void*)addr)) {
 520     st->print(PTR_FORMAT " is a %s oop: ", addr, ZAddress::is_good(addr) ? "good" : "bad");
 521     ZOop::from_address(addr)->print_on(st);
 522     return true;
 523   }
 524 
 525   return false;
 526 }
 527 
 528 void ZHeap::verify() {
 529   // Heap verification can only be done between mark end and
 530   // relocate start. This is the only window where all oop are
 531   // good and the whole heap is in a consistent state.
 532   guarantee(ZGlobalPhase == ZPhaseMarkCompleted, "Invalid phase");
 533 
 534   ZVerify::after_weak_processing();
 535 }
< prev index next >