385 jvmtiAddrLocationMap** map_ptr,
386 jint *map_length_ptr)
387 {
388 ResourceMark rm;
389 jvmtiAddrLocationMap* map = NULL;
390 jint map_length = 0;
391
392
393 // Generate line numbers using PcDesc and ScopeDesc info
394 methodHandle mh(nm->method());
395
396 if (!mh->is_native()) {
397 PcDesc *pcd;
398 int pcds_in_method;
399
400 pcds_in_method = (nm->scopes_pcs_end() - nm->scopes_pcs_begin());
401 map = NEW_C_HEAP_ARRAY(jvmtiAddrLocationMap, pcds_in_method);
402
403 address scopes_data = nm->scopes_data_begin();
404 for( pcd = nm->scopes_pcs_begin(); pcd < nm->scopes_pcs_end(); ++pcd ) {
405 ScopeDesc sc0(nm, pcd->scope_decode_offset(), pcd->should_reexecute());
406 ScopeDesc *sd = &sc0;
407 while( !sd->is_top() ) { sd = sd->sender(); }
408 int bci = sd->bci();
409 if (bci != InvocationEntryBci) {
410 assert(map_length < pcds_in_method, "checking");
411 map[map_length].start_address = (const void*)pcd->real_pc(nm);
412 map[map_length].location = bci;
413 ++map_length;
414 }
415 }
416 }
417
418 *map_ptr = map;
419 *map_length_ptr = map_length;
420 }
|
385 jvmtiAddrLocationMap** map_ptr,
386 jint *map_length_ptr)
387 {
388 ResourceMark rm;
389 jvmtiAddrLocationMap* map = NULL;
390 jint map_length = 0;
391
392
393 // Generate line numbers using PcDesc and ScopeDesc info
394 methodHandle mh(nm->method());
395
396 if (!mh->is_native()) {
397 PcDesc *pcd;
398 int pcds_in_method;
399
400 pcds_in_method = (nm->scopes_pcs_end() - nm->scopes_pcs_begin());
401 map = NEW_C_HEAP_ARRAY(jvmtiAddrLocationMap, pcds_in_method);
402
403 address scopes_data = nm->scopes_data_begin();
404 for( pcd = nm->scopes_pcs_begin(); pcd < nm->scopes_pcs_end(); ++pcd ) {
405 ScopeDesc sc0(nm, pcd->scope_decode_offset(), pcd->should_reexecute(), pcd->return_oop());
406 ScopeDesc *sd = &sc0;
407 while( !sd->is_top() ) { sd = sd->sender(); }
408 int bci = sd->bci();
409 if (bci != InvocationEntryBci) {
410 assert(map_length < pcds_in_method, "checking");
411 map[map_length].start_address = (const void*)pcd->real_pc(nm);
412 map[map_length].location = bci;
413 ++map_length;
414 }
415 }
416 }
417
418 *map_ptr = map;
419 *map_length_ptr = map_length;
420 }
|