comparison src/share/vm/compiler/oopMap.cpp @ 244:524eca34ea76

6684714: Optimize EA Connection Graph build performance Summary: switch on EA by default, optimize Connection Graph construction Reviewed-by: rasbold, never
author kvn
date Thu, 03 Jul 2008 18:02:47 -0700
parents ba764ed4b6f2
children 4a4c365f777d
comparison
equal deleted inserted replaced
231:72c3e8693c9a 244:524eca34ea76
186 } else { 186 } else {
187 set_xxx(reg, OopMapValue::derived_oop_value, derived_from_local_register); 187 set_xxx(reg, OopMapValue::derived_oop_value, derived_from_local_register);
188 } 188 }
189 } 189 }
190 190
191 void OopMap::set_stack_obj(VMReg reg) {
192 set_xxx(reg, OopMapValue::stack_obj, VMRegImpl::Bad());
193 }
194
195 // OopMapSet 191 // OopMapSet
196 192
197 OopMapSet::OopMapSet() { 193 OopMapSet::OopMapSet() {
198 set_om_size(MinOopMapAllocation); 194 set_om_size(MinOopMapAllocation);
199 set_om_count(0); 195 set_om_count(0);
397 omv = oms.current(); 393 omv = oms.current();
398 oop* loc = fr->oopmapreg_to_location(omv.reg(),reg_map); 394 oop* loc = fr->oopmapreg_to_location(omv.reg(),reg_map);
399 if ( loc != NULL ) { 395 if ( loc != NULL ) {
400 if ( omv.type() == OopMapValue::oop_value ) { 396 if ( omv.type() == OopMapValue::oop_value ) {
401 #ifdef ASSERT 397 #ifdef ASSERT
402 if (COMPILER2_PRESENT(!DoEscapeAnalysis &&) 398 if ((((uintptr_t)loc & (sizeof(*loc)-1)) != 0) ||
403 (((uintptr_t)loc & (sizeof(*loc)-1)) != 0) ||
404 !Universe::heap()->is_in_or_null(*loc)) { 399 !Universe::heap()->is_in_or_null(*loc)) {
405 tty->print_cr("# Found non oop pointer. Dumping state at failure"); 400 tty->print_cr("# Found non oop pointer. Dumping state at failure");
406 // try to dump out some helpful debugging information 401 // try to dump out some helpful debugging information
407 trace_codeblob_maps(fr, reg_map); 402 trace_codeblob_maps(fr, reg_map);
408 omv.print(); 403 omv.print();
429 oop_fn->do_oop(nl); 424 oop_fn->do_oop(nl);
430 } 425 }
431 } 426 }
432 } 427 }
433 } 428 }
434
435 #ifdef COMPILER2
436 if (DoEscapeAnalysis) {
437 for (OopMapStream oms(map, OopMapValue::stack_obj); !oms.is_done(); oms.next()) {
438 omv = oms.current();
439 assert(omv.is_stack_loc(), "should refer to stack location");
440 oop loc = (oop) fr->oopmapreg_to_location(omv.reg(),reg_map);
441 oop_fn->do_oop(&loc);
442 }
443 }
444 #endif // COMPILER2
445 } 429 }
446 430
447 431
448 // Update callee-saved register info for the following frame 432 // Update callee-saved register info for the following frame
449 void OopMapSet::update_register_map(const frame *fr, RegisterMap *reg_map) { 433 void OopMapSet::update_register_map(const frame *fr, RegisterMap *reg_map) {
538 break; 522 break;
539 case OopMapValue::derived_oop_value: 523 case OopMapValue::derived_oop_value:
540 st->print("Derived_oop_" ); 524 st->print("Derived_oop_" );
541 optional->print_on(st); 525 optional->print_on(st);
542 break; 526 break;
543 case OopMapValue::stack_obj:
544 st->print("Stack");
545 break;
546 default: 527 default:
547 ShouldNotReachHere(); 528 ShouldNotReachHere();
548 } 529 }
549 } 530 }
550 531