161 err_msg("Attempt to access p = "PTR_FORMAT" out of bounds of " 162 " card marking array's _whole_heap = ["PTR_FORMAT","PTR_FORMAT")", 163 p2i(p), p2i(_whole_heap.start()), p2i(_whole_heap.end()))); 164 jbyte* result = &byte_map_base[uintptr_t(p) >> card_shift]; 165 assert(result >= _byte_map && result < _byte_map + _byte_map_size, 166 "out of bounds accessor for card marking array"); 167 return result; 168 } 169 170 // The card table byte one after the card marking array 171 // entry for argument address. Typically used for higher bounds 172 // for loops iterating through the card table. 173 jbyte* byte_after(const void* p) const { 174 return byte_for(p) + 1; 175 } 176 177 // Iterate over the portion of the card-table which covers the given 178 // region mr in the given space and apply cl to any dirty sub-regions 179 // of mr. Clears the dirty cards as they are processed. 180 void non_clean_card_iterate_possibly_parallel(Space* sp, MemRegion mr, 181 OopsInGenClosure* cl, CardTableRS* ct); 182 183 private: 184 // Work method used to implement non_clean_card_iterate_possibly_parallel() 185 // above in the parallel case. 186 void non_clean_card_iterate_parallel_work(Space* sp, MemRegion mr, 187 OopsInGenClosure* cl, CardTableRS* ct, 188 int n_threads); 189 190 protected: 191 // Dirty the bytes corresponding to "mr" (not all of which must be 192 // covered.) 193 void dirty_MemRegion(MemRegion mr); 194 195 // Clear (to clean_card) the bytes entirely contained within "mr" (not 196 // all of which must be covered.) 197 void clear_MemRegion(MemRegion mr); 198 199 // *** Support for parallel card scanning. 200 201 // This is an array, one element per covered region of the card table. 202 // Each entry is itself an array, with one element per chunk in the 203 // covered region. Each entry of these arrays is the lowest non-clean 204 // card of the corresponding chunk containing part of an object from the 205 // previous chunk, or else NULL. 206 typedef jbyte* CardPtr; 207 typedef CardPtr* CardArr; 208 CardArr* _lowest_non_clean; | 161 err_msg("Attempt to access p = "PTR_FORMAT" out of bounds of " 162 " card marking array's _whole_heap = ["PTR_FORMAT","PTR_FORMAT")", 163 p2i(p), p2i(_whole_heap.start()), p2i(_whole_heap.end()))); 164 jbyte* result = &byte_map_base[uintptr_t(p) >> card_shift]; 165 assert(result >= _byte_map && result < _byte_map + _byte_map_size, 166 "out of bounds accessor for card marking array"); 167 return result; 168 } 169 170 // The card table byte one after the card marking array 171 // entry for argument address. Typically used for higher bounds 172 // for loops iterating through the card table. 173 jbyte* byte_after(const void* p) const { 174 return byte_for(p) + 1; 175 } 176 177 // Iterate over the portion of the card-table which covers the given 178 // region mr in the given space and apply cl to any dirty sub-regions 179 // of mr. Clears the dirty cards as they are processed. 180 void non_clean_card_iterate_possibly_parallel(Space* sp, MemRegion mr, 181 OopsInGenClosure* cl, CardTableRS* ct, 182 uint n_threads); 183 184 private: 185 // Work method used to implement non_clean_card_iterate_possibly_parallel() 186 // above in the parallel case. 187 void non_clean_card_iterate_parallel_work(Space* sp, MemRegion mr, 188 OopsInGenClosure* cl, CardTableRS* ct, 189 uint n_threads); 190 191 protected: 192 // Dirty the bytes corresponding to "mr" (not all of which must be 193 // covered.) 194 void dirty_MemRegion(MemRegion mr); 195 196 // Clear (to clean_card) the bytes entirely contained within "mr" (not 197 // all of which must be covered.) 198 void clear_MemRegion(MemRegion mr); 199 200 // *** Support for parallel card scanning. 201 202 // This is an array, one element per covered region of the card table. 203 // Each entry is itself an array, with one element per chunk in the 204 // covered region. Each entry of these arrays is the lowest non-clean 205 // card of the corresponding chunk containing part of an object from the 206 // previous chunk, or else NULL. 207 typedef jbyte* CardPtr; 208 typedef CardPtr* CardArr; 209 CardArr* _lowest_non_clean; |