Mercurial > hg > truffle
comparison src/share/vm/oops/markOop.hpp @ 342:37f87013dfd8
6711316: Open source the Garbage-First garbage collector
Summary: First mercurial integration of the code for the Garbage-First garbage collector.
Reviewed-by: apetrusenko, iveresov, jmasa, sgoldman, tonyp, ysr
author | ysr |
---|---|
date | Thu, 05 Jun 2008 15:57:56 -0700 |
parents | ba764ed4b6f2 |
children | 6aae2f9d0294 |
comparison
equal
deleted
inserted
replaced
189:0b27f3512f9e | 342:37f87013dfd8 |
---|---|
214 // other thread. (They should spin or block instead. The 0 value | 214 // other thread. (They should spin or block instead. The 0 value |
215 // is transient and *should* be short-lived). | 215 // is transient and *should* be short-lived). |
216 static markOop INFLATING() { return (markOop) 0; } // inflate-in-progress | 216 static markOop INFLATING() { return (markOop) 0; } // inflate-in-progress |
217 | 217 |
218 // Should this header be preserved during GC? | 218 // Should this header be preserved during GC? |
219 bool must_be_preserved(oop obj_containing_mark) const { | 219 inline bool must_be_preserved(oop obj_containing_mark) const; |
220 if (!UseBiasedLocking) | |
221 return (!is_unlocked() || !has_no_hash()); | |
222 return must_be_preserved_with_bias(obj_containing_mark); | |
223 } | |
224 inline bool must_be_preserved_with_bias(oop obj_containing_mark) const; | 220 inline bool must_be_preserved_with_bias(oop obj_containing_mark) const; |
225 | 221 |
226 // Should this header (including its age bits) be preserved in the | 222 // Should this header (including its age bits) be preserved in the |
227 // case of a promotion failure during scavenge? | 223 // case of a promotion failure during scavenge? |
228 // Note that we special case this situation. We want to avoid | 224 // Note that we special case this situation. We want to avoid |
238 // place in which to call them in any of the scavengers (although | 234 // place in which to call them in any of the scavengers (although |
239 // guarded by appropriate locks we could make one), but the | 235 // guarded by appropriate locks we could make one), but the |
240 // observation is that promotion failures are quite rare and | 236 // observation is that promotion failures are quite rare and |
241 // reducing the number of mark words preserved during them isn't a | 237 // reducing the number of mark words preserved during them isn't a |
242 // high priority. | 238 // high priority. |
243 bool must_be_preserved_for_promotion_failure(oop obj_containing_mark) const { | 239 inline bool must_be_preserved_for_promotion_failure(oop obj_containing_mark) const; |
244 if (!UseBiasedLocking) | |
245 return (this != prototype()); | |
246 return must_be_preserved_with_bias_for_promotion_failure(obj_containing_mark); | |
247 } | |
248 inline bool must_be_preserved_with_bias_for_promotion_failure(oop obj_containing_mark) const; | 240 inline bool must_be_preserved_with_bias_for_promotion_failure(oop obj_containing_mark) const; |
249 | 241 |
250 // Should this header be preserved during a scavenge where CMS is | 242 // Should this header be preserved during a scavenge where CMS is |
251 // the old generation? | 243 // the old generation? |
252 // (This is basically the same body as must_be_preserved_for_promotion_failure(), | 244 // (This is basically the same body as must_be_preserved_for_promotion_failure(), |
253 // but takes the klassOop as argument instead) | 245 // but takes the klassOop as argument instead) |
254 bool must_be_preserved_for_cms_scavenge(klassOop klass_of_obj_containing_mark) const { | 246 inline bool must_be_preserved_for_cms_scavenge(klassOop klass_of_obj_containing_mark) const; |
255 if (!UseBiasedLocking) | |
256 return (this != prototype()); | |
257 return must_be_preserved_with_bias_for_cms_scavenge(klass_of_obj_containing_mark); | |
258 } | |
259 inline bool must_be_preserved_with_bias_for_cms_scavenge(klassOop klass_of_obj_containing_mark) const; | 247 inline bool must_be_preserved_with_bias_for_cms_scavenge(klassOop klass_of_obj_containing_mark) const; |
260 | 248 |
261 // WARNING: The following routines are used EXCLUSIVELY by | 249 // WARNING: The following routines are used EXCLUSIVELY by |
262 // synchronization functions. They are not really gc safe. | 250 // synchronization functions. They are not really gc safe. |
263 // They must get updated if markOop layout get changed. | 251 // They must get updated if markOop layout get changed. |