No_GC_Verifier::No_GC_Verifier(bool verifygc) { _verifygc = verifygc; if (_verifygc) { CollectedHeap* h = Universe::heap(); assert(!h->is_gc_active(), "GC active during No_GC_Verifier"); _old_invocations = h->total_collections(); } }
Pause_No_GC_Verifier::~Pause_No_GC_Verifier() { if (_ngcv->_verifygc) { // if we were verifying before, then reenable verification CollectedHeap* h = Universe::heap(); assert(!h->is_gc_active(), "GC active during No_GC_Verifier"); _ngcv->_old_invocations = h->total_collections(); } }
No_GC_Verifier::~No_GC_Verifier() { if (_verifygc) { CollectedHeap* h = Universe::heap(); assert(!h->is_gc_active(), "GC active during No_GC_Verifier"); if (_old_invocations != h->total_collections()) { fatal("collection in a No_GC_Verifier secured function"); } } }
Pause_No_GC_Verifier::Pause_No_GC_Verifier(No_GC_Verifier * ngcv) { _ngcv = ngcv; if (_ngcv->_verifygc) { // if we were verifying, then make sure that nothing is // wrong before we "pause" verification CollectedHeap* h = Universe::heap(); assert(!h->is_gc_active(), "GC active during No_GC_Verifier"); if (_ngcv->_old_invocations != h->total_collections()) { fatal("collection in a No_GC_Verifier secured function"); } } }
~IsGCActiveMark() { CollectedHeap* heap = Universe::heap(); assert(heap->is_gc_active(), "Sanity"); heap->_is_gc_active = false; }
IsGCActiveMark() { CollectedHeap* heap = Universe::heap(); assert(!heap->is_gc_active(), "Not reentrant"); heap->_is_gc_active = true; }