755 assert(worker_id < _max_worker_id, "oob"); 756 assert(_count_marked_bytes != NULL, "uninitialized"); 757 size_t* marked_bytes_array = _count_marked_bytes[worker_id]; 758 assert(marked_bytes_array != NULL, "uninitialized"); 759 return marked_bytes_array; 760 } 761 762 // Returns the index in the liveness accounting card table bitmap 763 // for the given address 764 inline BitMap::idx_t card_bitmap_index_for(HeapWord* addr); 765 766 // Counts the size of the given memory region in the the given 767 // marked_bytes array slot for the given HeapRegion. 768 // Sets the bits in the given card bitmap that are associated with the 769 // cards that are spanned by the memory region. 770 inline void count_region(MemRegion mr, 771 HeapRegion* hr, 772 size_t* marked_bytes_array, 773 BitMap* task_card_bm); 774 775 // Counts the given memory region in the task/worker counting 776 // data structures for the given worker id. 777 inline void count_region(MemRegion mr, HeapRegion* hr, uint worker_id); 778 779 // Counts the given object in the given task/worker counting 780 // data structures. 781 inline void count_object(oop obj, 782 HeapRegion* hr, 783 size_t* marked_bytes_array, 784 BitMap* task_card_bm); 785 786 // Attempts to mark the given object and, if successful, counts 787 // the object in the given task/worker counting structures. 788 inline bool par_mark_and_count(oop obj, 789 HeapRegion* hr, 790 size_t* marked_bytes_array, 791 BitMap* task_card_bm); 792 793 // Attempts to mark the given object and, if successful, counts 794 // the object in the task/worker counting structures for the 795 // given worker id. 796 inline bool par_mark_and_count(oop obj, 797 size_t word_size, 798 HeapRegion* hr, 799 uint worker_id); 800 801 // Returns true if initialization was successfully completed. 802 bool completed_initialization() const { 803 return _completed_initialization; 804 } | 755 assert(worker_id < _max_worker_id, "oob"); 756 assert(_count_marked_bytes != NULL, "uninitialized"); 757 size_t* marked_bytes_array = _count_marked_bytes[worker_id]; 758 assert(marked_bytes_array != NULL, "uninitialized"); 759 return marked_bytes_array; 760 } 761 762 // Returns the index in the liveness accounting card table bitmap 763 // for the given address 764 inline BitMap::idx_t card_bitmap_index_for(HeapWord* addr); 765 766 // Counts the size of the given memory region in the the given 767 // marked_bytes array slot for the given HeapRegion. 768 // Sets the bits in the given card bitmap that are associated with the 769 // cards that are spanned by the memory region. 770 inline void count_region(MemRegion mr, 771 HeapRegion* hr, 772 size_t* marked_bytes_array, 773 BitMap* task_card_bm); 774 775 // Counts the given object in the given task/worker counting 776 // data structures. 777 inline void count_object(oop obj, 778 HeapRegion* hr, 779 size_t* marked_bytes_array, 780 BitMap* task_card_bm, 781 size_t word_size); 782 783 // Attempts to mark the given object and, if successful, counts 784 // the object in the given task/worker counting structures. 785 inline bool par_mark_and_count(oop obj, 786 HeapRegion* hr, 787 size_t* marked_bytes_array, 788 BitMap* task_card_bm); 789 790 // Attempts to mark the given object and, if successful, counts 791 // the object in the task/worker counting structures for the 792 // given worker id. 793 inline bool par_mark_and_count(oop obj, 794 size_t word_size, 795 HeapRegion* hr, 796 uint worker_id); 797 798 // Returns true if initialization was successfully completed. 799 bool completed_initialization() const { 800 return _completed_initialization; 801 } |