hotspot/src/share/vm/memory/genCollectedHeap.cpp
void GenCollectedHeap::collect(GCCause::Cause cause, int max_level) {
{- -------------------------------------------
(1) (assert)
---------------------------------------- -}
// The caller doesn't have the Heap_lock
assert(!Heap_lock->owned_by_self(), "this thread should not own the Heap_lock");
{- -------------------------------------------
(1) MutexLocker でロックを取った状態で, GenCollectedHeap::collect_locked() を呼び出すだけ.
---------------------------------------- -}
MutexLocker ml(Heap_lock);
collect_locked(cause, max_level);
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.