528 return counter_cell_count; 529 } 530 531 virtual int cell_count() { 532 return static_cell_count(); 533 } 534 535 // Direct accessor 536 uint count() { 537 return uint_at(count_off); 538 } 539 540 // Code generation support 541 static ByteSize count_offset() { 542 return cell_offset(count_off); 543 } 544 static ByteSize counter_data_size() { 545 return cell_offset(counter_cell_count); 546 } 547 548 #ifndef PRODUCT 549 void print_data_on(outputStream* st); 550 #endif 551 }; 552 553 // JumpData 554 // 555 // A JumpData is used to access profiling information for a direct 556 // branch. It is a counter, used for counting the number of branches, 557 // plus a data displacement, used for realigning the data pointer to 558 // the corresponding target bci. 559 class JumpData : public ProfileData { 560 protected: 561 enum { 562 taken_off_set, 563 displacement_off_set, 564 jump_cell_count 565 }; 566 567 void set_displacement(int displacement) { 675 return recv; 676 } 677 678 void set_receiver(uint row, oop p) { 679 assert((uint)row < row_limit(), "oob"); 680 set_oop_at(receiver_cell_index(row), p); 681 } 682 683 uint receiver_count(uint row) { 684 assert(row < row_limit(), "oob"); 685 return uint_at(receiver_count_cell_index(row)); 686 } 687 688 void set_receiver_count(uint row, uint count) { 689 assert(row < row_limit(), "oob"); 690 set_uint_at(receiver_count_cell_index(row), count); 691 } 692 693 void clear_row(uint row) { 694 assert(row < row_limit(), "oob"); 695 set_receiver(row, NULL); 696 set_receiver_count(row, 0); 697 } 698 699 // Code generation support 700 static ByteSize receiver_offset(uint row) { 701 return cell_offset(receiver_cell_index(row)); 702 } 703 static ByteSize receiver_count_offset(uint row) { 704 return cell_offset(receiver_count_cell_index(row)); 705 } 706 static ByteSize receiver_type_data_size() { 707 return cell_offset(static_cell_count()); 708 } 709 710 // GC support 711 virtual void follow_contents(); 712 virtual void oop_iterate(OopClosure* blk); 713 virtual void oop_iterate_m(OopClosure* blk, MemRegion mr); 714 virtual void adjust_pointers(); | 528 return counter_cell_count; 529 } 530 531 virtual int cell_count() { 532 return static_cell_count(); 533 } 534 535 // Direct accessor 536 uint count() { 537 return uint_at(count_off); 538 } 539 540 // Code generation support 541 static ByteSize count_offset() { 542 return cell_offset(count_off); 543 } 544 static ByteSize counter_data_size() { 545 return cell_offset(counter_cell_count); 546 } 547 548 void set_count(uint count) { 549 set_uint_at(count_off, count); 550 } 551 552 #ifndef PRODUCT 553 void print_data_on(outputStream* st); 554 #endif 555 }; 556 557 // JumpData 558 // 559 // A JumpData is used to access profiling information for a direct 560 // branch. It is a counter, used for counting the number of branches, 561 // plus a data displacement, used for realigning the data pointer to 562 // the corresponding target bci. 563 class JumpData : public ProfileData { 564 protected: 565 enum { 566 taken_off_set, 567 displacement_off_set, 568 jump_cell_count 569 }; 570 571 void set_displacement(int displacement) { 679 return recv; 680 } 681 682 void set_receiver(uint row, oop p) { 683 assert((uint)row < row_limit(), "oob"); 684 set_oop_at(receiver_cell_index(row), p); 685 } 686 687 uint receiver_count(uint row) { 688 assert(row < row_limit(), "oob"); 689 return uint_at(receiver_count_cell_index(row)); 690 } 691 692 void set_receiver_count(uint row, uint count) { 693 assert(row < row_limit(), "oob"); 694 set_uint_at(receiver_count_cell_index(row), count); 695 } 696 697 void clear_row(uint row) { 698 assert(row < row_limit(), "oob"); 699 // Cleare total count - indicator of polimorphic call site. 700 // An additional receiver will be recorded in the cleaned row 701 // during next call execution. 702 set_count(0); 703 set_receiver(row, NULL); 704 set_receiver_count(row, 0); 705 } 706 707 // Code generation support 708 static ByteSize receiver_offset(uint row) { 709 return cell_offset(receiver_cell_index(row)); 710 } 711 static ByteSize receiver_count_offset(uint row) { 712 return cell_offset(receiver_count_cell_index(row)); 713 } 714 static ByteSize receiver_type_data_size() { 715 return cell_offset(static_cell_count()); 716 } 717 718 // GC support 719 virtual void follow_contents(); 720 virtual void oop_iterate(OopClosure* blk); 721 virtual void oop_iterate_m(OopClosure* blk, MemRegion mr); 722 virtual void adjust_pointers(); |