hotspot/src/share/vm/services/gcNotifier.cpp
void GCNotifier::pushNotification(GCMemoryManager *mgr, const char *action, const char *cause) {
{- -------------------------------------------
(1) (変数宣言など)
---------------------------------------- -}
// Make a copy of the last GC statistics
// GC may occur between now and the creation of the notification
int num_pools = MemoryService::num_memory_pools();
{- -------------------------------------------
(1) GCMemoryManager::get_last_gc_stat() で,
最後に起こった GC に関する情報を取得する.
---------------------------------------- -}
GCStatInfo* stat = new GCStatInfo(num_pools);
mgr->get_last_gc_stat(stat);
{- -------------------------------------------
(1) 通知内容を表す新しい GCNotificationRequest オブジェクトを作り,
GCNotifier::addRequest() で GCNotifier 内部のリストにつないでおく.
(ついでに, ServiceThread も起床させている)
---------------------------------------- -}
GCNotificationRequest *request = new GCNotificationRequest(os::javaTimeMillis(),mgr,action,cause,stat);
addRequest(request);
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.