< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahVerifier.cpp

Print this page
rev 59828 : 8247845: Shenandoah: refactor TLAB/GCLAB retirement code
Reviewed-by: XXX


 673               "%s: heap used size must be consistent: heap-used = " SIZE_FORMAT "%s, regions-used = " SIZE_FORMAT "%s",
 674               label,
 675               byte_size_in_proper_unit(heap_used), proper_unit_for_byte_size(heap_used),
 676               byte_size_in_proper_unit(cl.used()), proper_unit_for_byte_size(cl.used()));
 677 
 678     size_t heap_committed = _heap->committed();
 679     guarantee(cl.committed() == heap_committed,
 680               "%s: heap committed size must be consistent: heap-committed = " SIZE_FORMAT "%s, regions-committed = " SIZE_FORMAT "%s",
 681               label,
 682               byte_size_in_proper_unit(heap_committed), proper_unit_for_byte_size(heap_committed),
 683               byte_size_in_proper_unit(cl.committed()), proper_unit_for_byte_size(cl.committed()));
 684   }
 685 
 686   // Internal heap region checks
 687   if (ShenandoahVerifyLevel >= 1) {
 688     ShenandoahVerifyHeapRegionClosure cl(label, regions);
 689     _heap->heap_region_iterate(&cl);
 690   }
 691 
 692   OrderAccess::fence();
 693   _heap->make_parsable(false);



 694 
 695   // Allocate temporary bitmap for storing marking wavefront:
 696   _verification_bit_map->clear();
 697 
 698   // Allocate temporary array for storing liveness data
 699   ShenandoahLivenessData* ld = NEW_C_HEAP_ARRAY(ShenandoahLivenessData, _heap->num_regions(), mtGC);
 700   Copy::fill_to_bytes((void*)ld, _heap->num_regions()*sizeof(ShenandoahLivenessData), 0);
 701 
 702   const VerifyOptions& options = ShenandoahVerifier::VerifyOptions(forwarded, marked, cset, liveness, regions, gcstate);
 703 
 704   // Steps 1-2. Scan root set to get initial reachable set. Finish walking the reachable heap.
 705   // This verifies what application can see, since it only cares about reachable objects.
 706   size_t count_reachable = 0;
 707   if (ShenandoahVerifyLevel >= 2) {
 708     ShenandoahRootVerifier verifier;
 709     switch (weak_roots) {
 710       case _verify_serial_weak_roots:
 711         verifier.excludes(ShenandoahRootVerifier::ConcurrentWeakRoots);
 712         break;
 713       case _verify_concurrent_weak_roots:




 673               "%s: heap used size must be consistent: heap-used = " SIZE_FORMAT "%s, regions-used = " SIZE_FORMAT "%s",
 674               label,
 675               byte_size_in_proper_unit(heap_used), proper_unit_for_byte_size(heap_used),
 676               byte_size_in_proper_unit(cl.used()), proper_unit_for_byte_size(cl.used()));
 677 
 678     size_t heap_committed = _heap->committed();
 679     guarantee(cl.committed() == heap_committed,
 680               "%s: heap committed size must be consistent: heap-committed = " SIZE_FORMAT "%s, regions-committed = " SIZE_FORMAT "%s",
 681               label,
 682               byte_size_in_proper_unit(heap_committed), proper_unit_for_byte_size(heap_committed),
 683               byte_size_in_proper_unit(cl.committed()), proper_unit_for_byte_size(cl.committed()));
 684   }
 685 
 686   // Internal heap region checks
 687   if (ShenandoahVerifyLevel >= 1) {
 688     ShenandoahVerifyHeapRegionClosure cl(label, regions);
 689     _heap->heap_region_iterate(&cl);
 690   }
 691 
 692   OrderAccess::fence();
 693 
 694   if (UseTLAB) {
 695     _heap->labs_make_parsable();
 696   }
 697 
 698   // Allocate temporary bitmap for storing marking wavefront:
 699   _verification_bit_map->clear();
 700 
 701   // Allocate temporary array for storing liveness data
 702   ShenandoahLivenessData* ld = NEW_C_HEAP_ARRAY(ShenandoahLivenessData, _heap->num_regions(), mtGC);
 703   Copy::fill_to_bytes((void*)ld, _heap->num_regions()*sizeof(ShenandoahLivenessData), 0);
 704 
 705   const VerifyOptions& options = ShenandoahVerifier::VerifyOptions(forwarded, marked, cset, liveness, regions, gcstate);
 706 
 707   // Steps 1-2. Scan root set to get initial reachable set. Finish walking the reachable heap.
 708   // This verifies what application can see, since it only cares about reachable objects.
 709   size_t count_reachable = 0;
 710   if (ShenandoahVerifyLevel >= 2) {
 711     ShenandoahRootVerifier verifier;
 712     switch (weak_roots) {
 713       case _verify_serial_weak_roots:
 714         verifier.excludes(ShenandoahRootVerifier::ConcurrentWeakRoots);
 715         break;
 716       case _verify_concurrent_weak_roots:


< prev index next >