Mercurial > hg > truffle
comparison src/share/vm/prims/jvmtiRawMonitor.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 | f95d63e2154a |
children | b9a9ed0f8eeb |
comparison
equal
deleted
inserted
replaced
6174:74533f63b116 | 6197:d2a62e0f25eb |
---|---|
25 #include "precompiled.hpp" | 25 #include "precompiled.hpp" |
26 #include "prims/jvmtiRawMonitor.hpp" | 26 #include "prims/jvmtiRawMonitor.hpp" |
27 #include "runtime/interfaceSupport.hpp" | 27 #include "runtime/interfaceSupport.hpp" |
28 #include "runtime/thread.hpp" | 28 #include "runtime/thread.hpp" |
29 | 29 |
30 GrowableArray<JvmtiRawMonitor*> *JvmtiPendingMonitors::_monitors = new (ResourceObj::C_HEAP) GrowableArray<JvmtiRawMonitor*>(1,true); | 30 GrowableArray<JvmtiRawMonitor*> *JvmtiPendingMonitors::_monitors = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<JvmtiRawMonitor*>(1,true); |
31 | 31 |
32 void JvmtiPendingMonitors::transition_raw_monitors() { | 32 void JvmtiPendingMonitors::transition_raw_monitors() { |
33 assert((Threads::number_of_threads()==1), | 33 assert((Threads::number_of_threads()==1), |
34 "Java thread has not created yet or more than one java thread \ | 34 "Java thread has not created yet or more than one java thread \ |
35 is running. Raw monitor transition will not work"); | 35 is running. Raw monitor transition will not work"); |
51 // class JvmtiRawMonitor | 51 // class JvmtiRawMonitor |
52 // | 52 // |
53 | 53 |
54 JvmtiRawMonitor::JvmtiRawMonitor(const char *name) { | 54 JvmtiRawMonitor::JvmtiRawMonitor(const char *name) { |
55 #ifdef ASSERT | 55 #ifdef ASSERT |
56 _name = strcpy(NEW_C_HEAP_ARRAY(char, strlen(name) + 1), name); | 56 _name = strcpy(NEW_C_HEAP_ARRAY(char, strlen(name) + 1, mtInternal), name); |
57 #else | 57 #else |
58 _name = NULL; | 58 _name = NULL; |
59 #endif | 59 #endif |
60 _magic = JVMTI_RM_MAGIC; | 60 _magic = JVMTI_RM_MAGIC; |
61 } | 61 } |