comparison src/share/vm/prims/jvmtiEnv.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 4ceaf61479fc
children 04ade88d9712
comparison
equal deleted inserted replaced
6174:74533f63b116 6197:d2a62e0f25eb
1010 jvmtiError err = JVMTI_ERROR_NONE; 1010 jvmtiError err = JVMTI_ERROR_NONE;
1011 JavaThread* calling_thread = JavaThread::current(); 1011 JavaThread* calling_thread = JavaThread::current();
1012 1012
1013 // growable array of jvmti monitors info on the C-heap 1013 // growable array of jvmti monitors info on the C-heap
1014 GrowableArray<jvmtiMonitorStackDepthInfo*> *owned_monitors_list = 1014 GrowableArray<jvmtiMonitorStackDepthInfo*> *owned_monitors_list =
1015 new (ResourceObj::C_HEAP) GrowableArray<jvmtiMonitorStackDepthInfo*>(1, true); 1015 new (ResourceObj::C_HEAP, mtInternal) GrowableArray<jvmtiMonitorStackDepthInfo*>(1, true);
1016 1016
1017 uint32_t debug_bits = 0; 1017 uint32_t debug_bits = 0;
1018 if (is_thread_fully_suspended(java_thread, true, &debug_bits)) { 1018 if (is_thread_fully_suspended(java_thread, true, &debug_bits)) {
1019 err = get_owned_monitors(calling_thread, java_thread, owned_monitors_list); 1019 err = get_owned_monitors(calling_thread, java_thread, owned_monitors_list);
1020 } else { 1020 } else {
1055 jvmtiError err = JVMTI_ERROR_NONE; 1055 jvmtiError err = JVMTI_ERROR_NONE;
1056 JavaThread* calling_thread = JavaThread::current(); 1056 JavaThread* calling_thread = JavaThread::current();
1057 1057
1058 // growable array of jvmti monitors info on the C-heap 1058 // growable array of jvmti monitors info on the C-heap
1059 GrowableArray<jvmtiMonitorStackDepthInfo*> *owned_monitors_list = 1059 GrowableArray<jvmtiMonitorStackDepthInfo*> *owned_monitors_list =
1060 new (ResourceObj::C_HEAP) GrowableArray<jvmtiMonitorStackDepthInfo*>(1, true); 1060 new (ResourceObj::C_HEAP, mtInternal) GrowableArray<jvmtiMonitorStackDepthInfo*>(1, true);
1061 1061
1062 uint32_t debug_bits = 0; 1062 uint32_t debug_bits = 0;
1063 if (is_thread_fully_suspended(java_thread, true, &debug_bits)) { 1063 if (is_thread_fully_suspended(java_thread, true, &debug_bits)) {
1064 err = get_owned_monitors(calling_thread, java_thread, owned_monitors_list); 1064 err = get_owned_monitors(calling_thread, java_thread, owned_monitors_list);
1065 } else { 1065 } else {