Mercurial > hg > graal-compiler
comparison src/share/vm/prims/jvmtiCodeBlobEvents.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 | 957c266d8bc5 b9a9ed0f8eeb |
comparison
equal
deleted
inserted
replaced
6174:74533f63b116 | 6197:d2a62e0f25eb |
---|---|
155 void CodeBlobCollector::collect() { | 155 void CodeBlobCollector::collect() { |
156 assert_locked_or_safepoint(CodeCache_lock); | 156 assert_locked_or_safepoint(CodeCache_lock); |
157 assert(_global_code_blobs == NULL, "checking"); | 157 assert(_global_code_blobs == NULL, "checking"); |
158 | 158 |
159 // create the global list | 159 // create the global list |
160 _global_code_blobs = new (ResourceObj::C_HEAP) GrowableArray<JvmtiCodeBlobDesc*>(50,true); | 160 _global_code_blobs = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<JvmtiCodeBlobDesc*>(50,true); |
161 | 161 |
162 // iterate over the stub code descriptors and put them in the list first. | 162 // iterate over the stub code descriptors and put them in the list first. |
163 int index = 0; | 163 int index = 0; |
164 StubCodeDesc* desc; | 164 StubCodeDesc* desc; |
165 while ((desc = StubCodeDesc::desc_for_index(++index)) != NULL) { | 165 while ((desc = StubCodeDesc::desc_for_index(++index)) != NULL) { |
245 if (!mh->is_native()) { | 245 if (!mh->is_native()) { |
246 PcDesc *pcd; | 246 PcDesc *pcd; |
247 int pcds_in_method; | 247 int pcds_in_method; |
248 | 248 |
249 pcds_in_method = (nm->scopes_pcs_end() - nm->scopes_pcs_begin()); | 249 pcds_in_method = (nm->scopes_pcs_end() - nm->scopes_pcs_begin()); |
250 map = NEW_C_HEAP_ARRAY(jvmtiAddrLocationMap, pcds_in_method); | 250 map = NEW_C_HEAP_ARRAY(jvmtiAddrLocationMap, pcds_in_method, mtInternal); |
251 | 251 |
252 address scopes_data = nm->scopes_data_begin(); | 252 address scopes_data = nm->scopes_data_begin(); |
253 for( pcd = nm->scopes_pcs_begin(); pcd < nm->scopes_pcs_end(); ++pcd ) { | 253 for( pcd = nm->scopes_pcs_begin(); pcd < nm->scopes_pcs_end(); ++pcd ) { |
254 ScopeDesc sc0(nm, pcd->scope_decode_offset(), pcd->should_reexecute(), pcd->return_oop()); | 254 ScopeDesc sc0(nm, pcd->scope_decode_offset(), pcd->should_reexecute(), pcd->return_oop()); |
255 ScopeDesc *sd = &sc0; | 255 ScopeDesc *sd = &sc0; |