comparison src/share/vm/services/gcNotifier.cpp @ 6197:d2a62e0f25eb

6995781: Native Memory Tracking (Phase 1) 7151532: DCmd for hotspot native memory tracking Summary: Implementation of native memory tracking phase 1, which tracks VM native memory usage, and related DCmd Reviewed-by: acorn, coleenp, fparain
author zgu
date Thu, 28 Jun 2012 17:03:16 -0400
parents 9a5bef0481c8
children da91efe96a93
comparison
equal deleted inserted replaced
6174:74533f63b116 6197:d2a62e0f25eb
43 void GCNotifier::pushNotification(GCMemoryManager *mgr, const char *action, const char *cause) { 43 void GCNotifier::pushNotification(GCMemoryManager *mgr, const char *action, const char *cause) {
44 // Make a copy of the last GC statistics 44 // Make a copy of the last GC statistics
45 // GC may occur between now and the creation of the notification 45 // GC may occur between now and the creation of the notification
46 int num_pools = MemoryService::num_memory_pools(); 46 int num_pools = MemoryService::num_memory_pools();
47 // stat is deallocated inside GCNotificationRequest 47 // stat is deallocated inside GCNotificationRequest
48 GCStatInfo* stat = new(ResourceObj::C_HEAP) GCStatInfo(num_pools); 48 GCStatInfo* stat = new(ResourceObj::C_HEAP, mtGC) GCStatInfo(num_pools);
49 mgr->get_last_gc_stat(stat); 49 mgr->get_last_gc_stat(stat);
50 GCNotificationRequest *request = new GCNotificationRequest(os::javaTimeMillis(),mgr,action,cause,stat); 50 GCNotificationRequest *request = new GCNotificationRequest(os::javaTimeMillis(),mgr,action,cause,stat);
51 addRequest(request); 51 addRequest(request);
52 } 52 }
53 53