493 494 // Code generation 495 static ByteSize base_offset() { return in_ByteSize(sizeof(ConstantPoolCache)); } 496 static ByteSize entry_offset(int raw_index) { 497 int index = raw_index; 498 return (base_offset() + ConstantPoolCacheEntry::size_in_bytes() * index); 499 } 500 501 #if INCLUDE_JVMTI 502 // RedefineClasses() API support: 503 // If any entry of this ConstantPoolCache points to any of 504 // old_methods, replace it with the corresponding new_method. 505 // trace_name_printed is set to true if the current call has 506 // printed the klass name so that other routines in the adjust_* 507 // group don't print the klass name. 508 void adjust_method_entries(InstanceKlass* holder, bool* trace_name_printed); 509 bool check_no_old_or_obsolete_entries(); 510 void dump_cache(); 511 #endif // INCLUDE_JVMTI 512 513 // Deallocate - no fields to deallocate 514 DEBUG_ONLY(bool on_stack() { return false; }) 515 void deallocate_contents(ClassLoaderData* data) {} 516 bool is_klass() const { return false; } 517 518 // Printing 519 void print_on(outputStream* st) const; 520 void print_value_on(outputStream* st) const; 521 522 const char* internal_name() const { return "{constant pool cache}"; } 523 524 // Verify 525 void verify_on(outputStream* st); 526 }; 527 528 #endif // SHARE_VM_OOPS_CPCACHEOOP_HPP | 493 494 // Code generation 495 static ByteSize base_offset() { return in_ByteSize(sizeof(ConstantPoolCache)); } 496 static ByteSize entry_offset(int raw_index) { 497 int index = raw_index; 498 return (base_offset() + ConstantPoolCacheEntry::size_in_bytes() * index); 499 } 500 501 #if INCLUDE_JVMTI 502 // RedefineClasses() API support: 503 // If any entry of this ConstantPoolCache points to any of 504 // old_methods, replace it with the corresponding new_method. 505 // trace_name_printed is set to true if the current call has 506 // printed the klass name so that other routines in the adjust_* 507 // group don't print the klass name. 508 void adjust_method_entries(InstanceKlass* holder, bool* trace_name_printed); 509 bool check_no_old_or_obsolete_entries(); 510 void dump_cache(); 511 #endif // INCLUDE_JVMTI 512 513 // RedefineClasses support 514 DEBUG_ONLY(bool on_stack() { return false; }) 515 void deallocate_contents(ClassLoaderData* data); 516 bool is_klass() const { return false; } 517 518 // Printing 519 void print_on(outputStream* st) const; 520 void print_value_on(outputStream* st) const; 521 522 const char* internal_name() const { return "{constant pool cache}"; } 523 524 // Verify 525 void verify_on(outputStream* st); 526 }; 527 528 #endif // SHARE_VM_OOPS_CPCACHEOOP_HPP |