Mercurial > hg > truffle
comparison src/share/vm/memory/cardTableModRefBS.hpp @ 845:df6caf649ff7
6700789: G1: Enable use of compressed oops with G1 heaps
Summary: Modifications to G1 so as to allow the use of compressed oops.
Reviewed-by: apetrusenko, coleenp, jmasa, kvn, never, phh, tonyp
author | ysr |
---|---|
date | Tue, 14 Jul 2009 15:40:39 -0700 |
parents | 7bb995fbd3c0 |
children | 8624da129f0b |
comparison
equal
deleted
inserted
replaced
839:bb18957ad21e | 845:df6caf649ff7 |
---|---|
285 // The scanning code has to handle the fact that the write barrier may be | 285 // The scanning code has to handle the fact that the write barrier may be |
286 // either precise or imprecise. We make non-virtual inline variants of | 286 // either precise or imprecise. We make non-virtual inline variants of |
287 // these functions here for performance. | 287 // these functions here for performance. |
288 protected: | 288 protected: |
289 void write_ref_field_work(oop obj, size_t offset, oop newVal); | 289 void write_ref_field_work(oop obj, size_t offset, oop newVal); |
290 void write_ref_field_work(void* field, oop newVal); | 290 virtual void write_ref_field_work(void* field, oop newVal); |
291 public: | 291 public: |
292 | 292 |
293 bool has_write_ref_array_opt() { return true; } | 293 bool has_write_ref_array_opt() { return true; } |
294 bool has_write_region_opt() { return true; } | 294 bool has_write_region_opt() { return true; } |
295 | 295 |
315 return is_card_aligned(addr); | 315 return is_card_aligned(addr); |
316 } | 316 } |
317 | 317 |
318 // *** Card-table-barrier-specific things. | 318 // *** Card-table-barrier-specific things. |
319 | 319 |
320 inline void inline_write_ref_field_pre(void* field, oop newVal) {} | 320 template <class T> inline void inline_write_ref_field_pre(T* field, oop newVal) {} |
321 | 321 |
322 inline void inline_write_ref_field(void* field, oop newVal) { | 322 template <class T> inline void inline_write_ref_field(T* field, oop newVal) { |
323 jbyte* byte = byte_for(field); | 323 jbyte* byte = byte_for((void*)field); |
324 *byte = dirty_card; | 324 *byte = dirty_card; |
325 } | 325 } |
326 | 326 |
327 // These are used by G1, when it uses the card table as a temporary data | 327 // These are used by G1, when it uses the card table as a temporary data |
328 // structure for card claiming. | 328 // structure for card claiming. |