867 ObjectStartArray* const _start_array;
868 size_t _offset;
869
870 inline void decrement_words_remaining(size_t words);
871 // Update variables to indicate that word_count words were processed.
872 inline void update_state(size_t words);
873
874 public:
875 ParMarkBitMap* bitmap() const { return _bitmap; }
876
877 size_t words_remaining() const { return _words_remaining; }
878 bool is_full() const { return _words_remaining == 0; }
879 HeapWord* source() const { return _source; }
880 void set_source(HeapWord* addr) {
881 assert(addr != nullptr, "precondition");
882 _source = addr;
883 }
884
885 // If the object will fit (size <= words_remaining()), copy it to the current
886 // destination, update the interior oops and the start array.
887 void do_addr(HeapWord* addr, size_t words);
888
889 inline MoveAndUpdateClosure(ParMarkBitMap* bitmap, size_t region);
890
891 // Accessors.
892 HeapWord* destination() const { return _destination; }
893 HeapWord* copy_destination() const { return _destination + _offset; }
894
895 // Copy enough words to fill this closure or to the end of an object,
896 // whichever is smaller, starting at source(). The start array is not
897 // updated.
898 void copy_partial_obj(size_t partial_obj_size);
899
900 virtual void complete_region(HeapWord* dest_addr, PSParallelCompact::RegionData* region_ptr);
901 };
902
903 inline void MoveAndUpdateClosure::decrement_words_remaining(size_t words) {
904 assert(_words_remaining >= words, "processed too many words");
905 _words_remaining -= words;
906 }
907
|
867 ObjectStartArray* const _start_array;
868 size_t _offset;
869
870 inline void decrement_words_remaining(size_t words);
871 // Update variables to indicate that word_count words were processed.
872 inline void update_state(size_t words);
873
874 public:
875 ParMarkBitMap* bitmap() const { return _bitmap; }
876
877 size_t words_remaining() const { return _words_remaining; }
878 bool is_full() const { return _words_remaining == 0; }
879 HeapWord* source() const { return _source; }
880 void set_source(HeapWord* addr) {
881 assert(addr != nullptr, "precondition");
882 _source = addr;
883 }
884
885 // If the object will fit (size <= words_remaining()), copy it to the current
886 // destination, update the interior oops and the start array.
887 void do_addr(HeapWord* addr, size_t words, markWord mark);
888
889 inline MoveAndUpdateClosure(ParMarkBitMap* bitmap, size_t region);
890
891 // Accessors.
892 HeapWord* destination() const { return _destination; }
893 HeapWord* copy_destination() const { return _destination + _offset; }
894
895 // Copy enough words to fill this closure or to the end of an object,
896 // whichever is smaller, starting at source(). The start array is not
897 // updated.
898 void copy_partial_obj(size_t partial_obj_size);
899
900 virtual void complete_region(HeapWord* dest_addr, PSParallelCompact::RegionData* region_ptr);
901 };
902
903 inline void MoveAndUpdateClosure::decrement_words_remaining(size_t words) {
904 assert(_words_remaining >= words, "processed too many words");
905 _words_remaining -= words;
906 }
907
|