comparison src/share/vm/memory/cardTableModRefBS.hpp @ 113:ba764ed4b6f2

6420645: Create a vm that uses compressed oops for up to 32gb heapsizes Summary: Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
author coleenp
date Sun, 13 Apr 2008 17:43:42 -0400
parents a61af66fc99e
children d1605aabd0a1 37f87013dfd8
comparison
equal deleted inserted replaced
110:a49a647afe9a 113:ba764ed4b6f2
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)