hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp
// This method is used by System.gc() and JVMTI.
void ParallelScavengeHeap::collect(GCCause::Cause cause) {
{- -------------------------------------------
(1) (assert)
---------------------------------------- -}
assert(!Heap_lock->owned_by_self(),
"this thread should not own the Heap_lock");
{- -------------------------------------------
(1) (変数宣言など)
---------------------------------------- -}
unsigned int gc_count = 0;
unsigned int full_gc_count = 0;
{
MutexLocker ml(Heap_lock);
// This value is guarded by the Heap_lock
gc_count = Universe::heap()->total_collections();
full_gc_count = Universe::heap()->total_full_collections();
}
{- -------------------------------------------
(1) VM_ParallelGCSystemGC を実行する.
---------------------------------------- -}
VM_ParallelGCSystemGC op(gc_count, full_gc_count, cause);
VMThread::execute(&op);
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.