< prev index next >

src/hotspot/share/prims/jvmtiCodeBlobEvents.cpp

Print this page
rev 56101 : 8227745: Enable Escape Analysis for better performance when debugging
Reviewed-by: ???


 247                                                         jvmtiAddrLocationMap** map_ptr,
 248                                                         jint *map_length_ptr)
 249 {
 250   ResourceMark rm;
 251   jvmtiAddrLocationMap* map = NULL;
 252   jint map_length = 0;
 253 
 254 
 255   // Generate line numbers using PcDesc and ScopeDesc info
 256   methodHandle mh(nm->method());
 257 
 258   if (!mh->is_native()) {
 259     PcDesc *pcd;
 260     int pcds_in_method;
 261 
 262     pcds_in_method = (nm->scopes_pcs_end() - nm->scopes_pcs_begin());
 263     map = NEW_C_HEAP_ARRAY(jvmtiAddrLocationMap, pcds_in_method, mtInternal);
 264 
 265     address scopes_data = nm->scopes_data_begin();
 266     for( pcd = nm->scopes_pcs_begin(); pcd < nm->scopes_pcs_end(); ++pcd ) {
 267       ScopeDesc sc0(nm, pcd->scope_decode_offset(), pcd->should_reexecute(), pcd->rethrow_exception(), pcd->return_oop());
 268       ScopeDesc *sd  = &sc0;
 269       while( !sd->is_top() ) { sd = sd->sender(); }
 270       int bci = sd->bci();
 271       if (bci >= 0) {
 272         assert(map_length < pcds_in_method, "checking");
 273         map[map_length].start_address = (const void*)pcd->real_pc(nm);
 274         map[map_length].location = bci;
 275         ++map_length;
 276       }
 277     }
 278   }
 279 
 280   *map_ptr = map;
 281   *map_length_ptr = map_length;
 282 }


 247                                                         jvmtiAddrLocationMap** map_ptr,
 248                                                         jint *map_length_ptr)
 249 {
 250   ResourceMark rm;
 251   jvmtiAddrLocationMap* map = NULL;
 252   jint map_length = 0;
 253 
 254 
 255   // Generate line numbers using PcDesc and ScopeDesc info
 256   methodHandle mh(nm->method());
 257 
 258   if (!mh->is_native()) {
 259     PcDesc *pcd;
 260     int pcds_in_method;
 261 
 262     pcds_in_method = (nm->scopes_pcs_end() - nm->scopes_pcs_begin());
 263     map = NEW_C_HEAP_ARRAY(jvmtiAddrLocationMap, pcds_in_method, mtInternal);
 264 
 265     address scopes_data = nm->scopes_data_begin();
 266     for( pcd = nm->scopes_pcs_begin(); pcd < nm->scopes_pcs_end(); ++pcd ) {
 267       ScopeDesc sc0(nm, pcd, true);
 268       ScopeDesc *sd  = &sc0;
 269       while( !sd->is_top() ) { sd = sd->sender(); }
 270       int bci = sd->bci();
 271       if (bci >= 0) {
 272         assert(map_length < pcds_in_method, "checking");
 273         map[map_length].start_address = (const void*)pcd->real_pc(nm);
 274         map[map_length].location = bci;
 275         ++map_length;
 276       }
 277     }
 278   }
 279 
 280   *map_ptr = map;
 281   *map_length_ptr = map_length;
 282 }
< prev index next >