461 return (address) _data; 462 } 463 DataLayout* limit_data_position() const { 464 return (DataLayout*)((address)data_base() + _data_size); 465 } 466 467 void load_extra_data(); 468 ciProfileData* bci_to_extra_data(int bci, ciMethod* m, bool& two_free_slots); 469 470 public: 471 bool is_method_data() const { return true; } 472 473 bool is_empty() { return _state == empty_state; } 474 bool is_mature() { return _state == mature_state; } 475 476 int creation_mileage() { return _orig.creation_mileage(); } 477 int current_mileage() { return _current_mileage; } 478 479 int invocation_count() { return _invocation_counter; } 480 int backedge_count() { return _backedge_counter; } 481 // Transfer information about the method to MethodData*. 482 // would_profile means we would like to profile this method, 483 // meaning it's not trivial. 484 void set_would_profile(bool p); 485 // Also set the numer of loops and blocks in the method. 486 // Again, this is used to determine if a method is trivial. 487 void set_compilation_stats(short loops, short blocks); 488 // If the compiler finds a profiled type that is known statically 489 // for sure, set it in the MethodData 490 void set_argument_type(int bci, int i, ciKlass* k); 491 void set_parameter_type(int i, ciKlass* k); 492 void set_return_type(int bci, ciKlass* k); 493 494 void load_data(); 495 496 // Convert a dp (data pointer) to a di (data index). 497 int dp_to_di(address dp) { 498 return dp - ((address)_data); 499 } 500 | 461 return (address) _data; 462 } 463 DataLayout* limit_data_position() const { 464 return (DataLayout*)((address)data_base() + _data_size); 465 } 466 467 void load_extra_data(); 468 ciProfileData* bci_to_extra_data(int bci, ciMethod* m, bool& two_free_slots); 469 470 public: 471 bool is_method_data() const { return true; } 472 473 bool is_empty() { return _state == empty_state; } 474 bool is_mature() { return _state == mature_state; } 475 476 int creation_mileage() { return _orig.creation_mileage(); } 477 int current_mileage() { return _current_mileage; } 478 479 int invocation_count() { return _invocation_counter; } 480 int backedge_count() { return _backedge_counter; } 481 482 #if INCLUDE_RTM_OPT 483 // return chached value 484 int rtm_state() { 485 if (is_empty()) { 486 return NoRTM; 487 } else { 488 return get_MethodData()->rtm_state(); 489 } 490 } 491 #endif 492 493 // Transfer information about the method to MethodData*. 494 // would_profile means we would like to profile this method, 495 // meaning it's not trivial. 496 void set_would_profile(bool p); 497 // Also set the numer of loops and blocks in the method. 498 // Again, this is used to determine if a method is trivial. 499 void set_compilation_stats(short loops, short blocks); 500 // If the compiler finds a profiled type that is known statically 501 // for sure, set it in the MethodData 502 void set_argument_type(int bci, int i, ciKlass* k); 503 void set_parameter_type(int i, ciKlass* k); 504 void set_return_type(int bci, ciKlass* k); 505 506 void load_data(); 507 508 // Convert a dp (data pointer) to a di (data index). 509 int dp_to_di(address dp) { 510 return dp - ((address)_data); 511 } 512 |