200 // Dirty the bytes corresponding to "mr" (not all of which must be
201 // covered.)
202 void dirty_MemRegion(MemRegion mr);
203
204 // Clear (to clean_card) the bytes entirely contained within "mr" (not
205 // all of which must be covered.)
206 void clear_MemRegion(MemRegion mr);
207
208 // *** Support for parallel card scanning.
209
210 // This is an array, one element per covered region of the card table.
211 // Each entry is itself an array, with one element per chunk in the
212 // covered region. Each entry of these arrays is the lowest non-clean
213 // card of the corresponding chunk containing part of an object from the
214 // previous chunk, or else NULL.
215 typedef jbyte* CardPtr;
216 typedef CardPtr* CardArr;
217 CardArr* _lowest_non_clean;
218 size_t* _lowest_non_clean_chunk_size;
219 uintptr_t* _lowest_non_clean_base_chunk_index;
220 int* _last_LNC_resizing_collection;
221
222 // Initializes "lowest_non_clean" to point to the array for the region
223 // covering "sp", and "lowest_non_clean_base_chunk_index" to the chunk
224 // index of the corresponding to the first element of that array.
225 // Ensures that these arrays are of sufficient size, allocating if necessary.
226 // May be called by several threads concurrently.
227 void get_LNC_array_for_space(Space* sp,
228 jbyte**& lowest_non_clean,
229 uintptr_t& lowest_non_clean_base_chunk_index,
230 size_t& lowest_non_clean_chunk_size);
231
232 // Returns the number of chunks necessary to cover "mr".
233 size_t chunks_to_cover(MemRegion mr) {
234 return (size_t)(addr_to_chunk_index(mr.last()) -
235 addr_to_chunk_index(mr.start()) + 1);
236 }
237
238 // Returns the index of the chunk in a stride which
239 // covers the given address.
240 uintptr_t addr_to_chunk_index(const void* addr) {
|
200 // Dirty the bytes corresponding to "mr" (not all of which must be
201 // covered.)
202 void dirty_MemRegion(MemRegion mr);
203
204 // Clear (to clean_card) the bytes entirely contained within "mr" (not
205 // all of which must be covered.)
206 void clear_MemRegion(MemRegion mr);
207
208 // *** Support for parallel card scanning.
209
210 // This is an array, one element per covered region of the card table.
211 // Each entry is itself an array, with one element per chunk in the
212 // covered region. Each entry of these arrays is the lowest non-clean
213 // card of the corresponding chunk containing part of an object from the
214 // previous chunk, or else NULL.
215 typedef jbyte* CardPtr;
216 typedef CardPtr* CardArr;
217 CardArr* _lowest_non_clean;
218 size_t* _lowest_non_clean_chunk_size;
219 uintptr_t* _lowest_non_clean_base_chunk_index;
220 volatile int* _last_LNC_resizing_collection;
221
222 // Initializes "lowest_non_clean" to point to the array for the region
223 // covering "sp", and "lowest_non_clean_base_chunk_index" to the chunk
224 // index of the corresponding to the first element of that array.
225 // Ensures that these arrays are of sufficient size, allocating if necessary.
226 // May be called by several threads concurrently.
227 void get_LNC_array_for_space(Space* sp,
228 jbyte**& lowest_non_clean,
229 uintptr_t& lowest_non_clean_base_chunk_index,
230 size_t& lowest_non_clean_chunk_size);
231
232 // Returns the number of chunks necessary to cover "mr".
233 size_t chunks_to_cover(MemRegion mr) {
234 return (size_t)(addr_to_chunk_index(mr.last()) -
235 addr_to_chunk_index(mr.start()) + 1);
236 }
237
238 // Returns the index of the chunk in a stride which
239 // covers the given address.
240 uintptr_t addr_to_chunk_index(const void* addr) {
|