< prev index next >
src/share/vm/gc/shared/gcLocker.cpp
Print this page
rev 12854 : [mq]: gcinterface.patch
@@ -133,11 +133,11 @@
_doing_gc = true;
{
// Must give up the lock while at a safepoint
MutexUnlocker munlock(JNICritical_lock);
log_debug_jni("Performing GC after exiting critical section.");
- Universe::heap()->collect(GCCause::_gc_locker);
+ GC::gc()->heap()->collect(GCCause::_gc_locker);
}
_doing_gc = false;
_needs_gc = false;
JNICritical_lock->notify_all();
}
@@ -148,20 +148,20 @@
#ifdef ASSERT
NoGCVerifier::NoGCVerifier(bool verifygc) {
_verifygc = verifygc;
if (_verifygc) {
- CollectedHeap* h = Universe::heap();
+ CollectedHeap* h = GC::gc()->heap();
assert(!h->is_gc_active(), "GC active during NoGCVerifier");
_old_invocations = h->total_collections();
}
}
NoGCVerifier::~NoGCVerifier() {
if (_verifygc) {
- CollectedHeap* h = Universe::heap();
+ CollectedHeap* h = GC::gc()->heap();
assert(!h->is_gc_active(), "GC active during NoGCVerifier");
if (_old_invocations != h->total_collections()) {
fatal("collection in a NoGCVerifier secured function");
}
}
@@ -170,11 +170,11 @@
PauseNoGCVerifier::PauseNoGCVerifier(NoGCVerifier * 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();
+ CollectedHeap* h = GC::gc()->heap();
assert(!h->is_gc_active(), "GC active during NoGCVerifier");
if (_ngcv->_old_invocations != h->total_collections()) {
fatal("collection in a NoGCVerifier secured function");
}
}
@@ -182,11 +182,11 @@
PauseNoGCVerifier::~PauseNoGCVerifier() {
if (_ngcv->_verifygc) {
// if we were verifying before, then reenable verification
- CollectedHeap* h = Universe::heap();
+ CollectedHeap* h = GC::gc()->heap();
assert(!h->is_gc_active(), "GC active during NoGCVerifier");
_ngcv->_old_invocations = h->total_collections();
}
}
< prev index next >