equal
deleted
inserted
replaced
271 |
271 |
272 CardTableModRefBS(MemRegion whole_heap, int max_covered_regions); |
272 CardTableModRefBS(MemRegion whole_heap, int max_covered_regions); |
273 |
273 |
274 // *** Barrier set functions. |
274 // *** Barrier set functions. |
275 |
275 |
276 inline bool write_ref_needs_barrier(oop* field, oop new_val) { |
276 inline bool write_ref_needs_barrier(void* field, oop new_val) { |
277 // Note that this assumes the perm gen is the highest generation |
277 // Note that this assumes the perm gen is the highest generation |
278 // in the address space |
278 // in the address space |
279 return new_val != NULL && !new_val->is_perm(); |
279 return new_val != NULL && !new_val->is_perm(); |
280 } |
280 } |
281 |
281 |
283 // The scanning code has to handle the fact that the write barrier may be |
283 // The scanning code has to handle the fact that the write barrier may be |
284 // either precise or imprecise. We make non-virtual inline variants of |
284 // either precise or imprecise. We make non-virtual inline variants of |
285 // these functions here for performance. |
285 // these functions here for performance. |
286 protected: |
286 protected: |
287 void write_ref_field_work(oop obj, size_t offset, oop newVal); |
287 void write_ref_field_work(oop obj, size_t offset, oop newVal); |
288 void write_ref_field_work(oop* field, oop newVal); |
288 void write_ref_field_work(void* field, oop newVal); |
289 public: |
289 public: |
290 |
290 |
291 bool has_write_ref_array_opt() { return true; } |
291 bool has_write_ref_array_opt() { return true; } |
292 bool has_write_region_opt() { return true; } |
292 bool has_write_region_opt() { return true; } |
293 |
293 |
313 return is_card_aligned(addr); |
313 return is_card_aligned(addr); |
314 } |
314 } |
315 |
315 |
316 // *** Card-table-barrier-specific things. |
316 // *** Card-table-barrier-specific things. |
317 |
317 |
318 inline void inline_write_ref_field(oop* field, oop newVal) { |
318 inline void inline_write_ref_field(void* field, oop newVal) { |
319 jbyte* byte = byte_for(field); |
319 jbyte* byte = byte_for(field); |
320 *byte = dirty_card; |
320 *byte = dirty_card; |
321 } |
321 } |
322 |
322 |
323 // Card marking array base (adjusted for heap low boundary) |
323 // Card marking array base (adjusted for heap low boundary) |