Mercurial > hg > graal-jvmci-8
comparison agent/src/share/classes/sun/jvm/hotspot/oops/Mark.java @ 187:790e66e5fbac
6687581: Make CMS work with compressed oops
Summary: Make FreeChunk read markword instead of LSB in _klass pointer to indicate that it's a FreeChunk for compressed oops.
Reviewed-by: ysr, jmasa
author | coleenp |
---|---|
date | Mon, 09 Jun 2008 11:51:19 -0400 |
parents | a61af66fc99e |
children | d1605aabd0a1 |
comparison
equal
deleted
inserted
replaced
185:8759d37f2524 | 187:790e66e5fbac |
---|---|
77 biasedLockPattern = db.lookupLongConstant("markOopDesc::biased_lock_pattern").longValue(); | 77 biasedLockPattern = db.lookupLongConstant("markOopDesc::biased_lock_pattern").longValue(); |
78 noHash = db.lookupLongConstant("markOopDesc::no_hash").longValue(); | 78 noHash = db.lookupLongConstant("markOopDesc::no_hash").longValue(); |
79 noHashInPlace = db.lookupLongConstant("markOopDesc::no_hash_in_place").longValue(); | 79 noHashInPlace = db.lookupLongConstant("markOopDesc::no_hash_in_place").longValue(); |
80 noLockInPlace = db.lookupLongConstant("markOopDesc::no_lock_in_place").longValue(); | 80 noLockInPlace = db.lookupLongConstant("markOopDesc::no_lock_in_place").longValue(); |
81 maxAge = db.lookupLongConstant("markOopDesc::max_age").longValue(); | 81 maxAge = db.lookupLongConstant("markOopDesc::max_age").longValue(); |
82 | |
83 /* Constants in markOop used by CMS. */ | |
84 cmsShift = db.lookupLongConstant("markOopDesc::cms_shift").longValue(); | |
85 cmsMask = db.lookupLongConstant("markOopDesc::cms_mask").longValue(); | |
86 sizeShift = db.lookupLongConstant("markOopDesc::size_shift").longValue(); | |
82 } | 87 } |
83 | 88 |
84 // Field accessors | 89 // Field accessors |
85 private static CIntegerField markField; | 90 private static CIntegerField markField; |
86 | 91 |
117 | 122 |
118 private static long noHashInPlace; | 123 private static long noHashInPlace; |
119 private static long noLockInPlace; | 124 private static long noLockInPlace; |
120 | 125 |
121 private static long maxAge; | 126 private static long maxAge; |
127 | |
128 /* Constants in markOop used by CMS. */ | |
129 private static long cmsShift; | |
130 private static long cmsMask; | |
131 private static long sizeShift; | |
122 | 132 |
123 public Mark(Address addr) { | 133 public Mark(Address addr) { |
124 super(addr); | 134 super(addr); |
125 } | 135 } |
126 | 136 |
288 // // Prepare address of oop for placement into mark | 298 // // Prepare address of oop for placement into mark |
289 // inline static markOop encode_pointer_as_mark(void* p) { return markOop(p)->set_marked(); } | 299 // inline static markOop encode_pointer_as_mark(void* p) { return markOop(p)->set_marked(); } |
290 // | 300 // |
291 // // Recover address of oop from encoded form used in mark | 301 // // Recover address of oop from encoded form used in mark |
292 // inline void* decode_pointer() { return clear_lock_bits(); } | 302 // inline void* decode_pointer() { return clear_lock_bits(); } |
303 | |
304 // Copy markOop methods for CMS here. | |
305 public boolean isCmsFreeChunk() { | |
306 return isUnlocked() && | |
307 (Bits.maskBitsLong(value() >> cmsShift, cmsMask) & 0x1L) == 0x1L; | |
308 } | |
309 public long getSize() { return (long)(value() >> sizeShift); } | |
293 } | 310 } |