2803 |
2803 |
2804 void G1CollectedHeap::verify(bool allow_dirty, |
2804 void G1CollectedHeap::verify(bool allow_dirty, |
2805 bool silent, |
2805 bool silent, |
2806 bool use_prev_marking) { |
2806 bool use_prev_marking) { |
2807 if (SafepointSynchronize::is_at_safepoint() || ! UseTLAB) { |
2807 if (SafepointSynchronize::is_at_safepoint() || ! UseTLAB) { |
2808 if (!silent) { gclog_or_tty->print("roots "); } |
2808 if (!silent) { gclog_or_tty->print("Roots (excluding permgen) "); } |
2809 VerifyRootsClosure rootsCl(use_prev_marking); |
2809 VerifyRootsClosure rootsCl(use_prev_marking); |
2810 CodeBlobToOopClosure blobsCl(&rootsCl, /*do_marking=*/ false); |
2810 CodeBlobToOopClosure blobsCl(&rootsCl, /*do_marking=*/ false); |
2811 process_strong_roots(true, // activate StrongRootsScope |
2811 // We apply the relevant closures to all the oops in the |
2812 false, |
2812 // system dictionary, the string table and the code cache. |
2813 SharedHeap::SO_AllClasses, |
2813 const int so = SharedHeap::SO_AllClasses | SharedHeap::SO_Strings | SharedHeap::SO_CodeCache; |
|
2814 process_strong_roots(true, // activate StrongRootsScope |
|
2815 true, // we set "collecting perm gen" to true, |
|
2816 // so we don't reset the dirty cards in the perm gen. |
|
2817 SharedHeap::ScanningOption(so), // roots scanning options |
2814 &rootsCl, |
2818 &rootsCl, |
2815 &blobsCl, |
2819 &blobsCl, |
2816 &rootsCl); |
2820 &rootsCl); |
|
2821 // Since we used "collecting_perm_gen" == true above, we will not have |
|
2822 // checked the refs from perm into the G1-collected heap. We check those |
|
2823 // references explicitly below. Whether the relevant cards are dirty |
|
2824 // is checked further below in the rem set verification. |
|
2825 if (!silent) { gclog_or_tty->print("Permgen roots "); } |
|
2826 perm_gen()->oop_iterate(&rootsCl); |
2817 bool failures = rootsCl.failures(); |
2827 bool failures = rootsCl.failures(); |
2818 rem_set()->invalidate(perm_gen()->used_region(), false); |
|
2819 if (!silent) { gclog_or_tty->print("HeapRegionSets "); } |
2828 if (!silent) { gclog_or_tty->print("HeapRegionSets "); } |
2820 verify_region_sets(); |
2829 verify_region_sets(); |
2821 if (!silent) { gclog_or_tty->print("HeapRegions "); } |
2830 if (!silent) { gclog_or_tty->print("HeapRegions "); } |
2822 if (GCParallelVerificationEnabled && ParallelGCThreads > 1) { |
2831 if (GCParallelVerificationEnabled && ParallelGCThreads > 1) { |
2823 assert(check_heap_region_claim_values(HeapRegion::InitialClaimValue), |
2832 assert(check_heap_region_claim_values(HeapRegion::InitialClaimValue), |