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