|
60 | 60 | // [ptr | 10] monitor inflated lock (header is swapped out, UseObjectMonitorTable == false) |
61 | 61 | // [header | 10] monitor inflated lock (UseObjectMonitorTable == true) |
62 | 62 | // [ptr | 11] marked used to mark an object |
63 | | -// [0 ............ 0| 00] inflating inflation in progress (stack-locking in use) |
64 | | -// |
65 | | -// We assume that stack/thread pointers have the lowest two bits cleared. |
66 | | -// |
67 | | -// - INFLATING() is a distinguished markword value of all zeros that is |
68 | | -// used when inflating an existing stack-lock into an ObjectMonitor. |
69 | | -// See below for is_being_inflated() and INFLATING(). |
70 | 63 |
|
71 | 64 | class BasicLock; |
72 | 65 | class ObjectMonitor; |
@@ -173,19 +166,6 @@ class markWord { |
173 | 166 | return (mask_bits(value(), lock_mask_in_place) == unlocked_value); |
174 | 167 | } |
175 | 168 |
|
176 | | - // Special temporary state of the markWord while being inflated. |
177 | | - // Code that looks at mark outside a lock need to take this into account. |
178 | | - bool is_being_inflated() const { return (value() == 0); } |
179 | | - |
180 | | - // Distinguished markword value - used when inflating over |
181 | | - // an existing stack-lock. 0 indicates the markword is "BUSY". |
182 | | - // Lockword mutators that use a LD...CAS idiom should always |
183 | | - // check for and avoid overwriting a 0 value installed by some |
184 | | - // other thread. (They should spin or block instead. The 0 value |
185 | | - // is transient and *should* be short-lived). |
186 | | - // Fast-locking does not use INFLATING. |
187 | | - static markWord INFLATING() { return zero(); } // inflate-in-progress |
188 | | - |
189 | 169 | // Should this header be preserved during GC? |
190 | 170 | bool must_be_preserved() const { |
191 | 171 | return (!is_unlocked() || !has_no_hash()); |
@@ -226,16 +206,7 @@ class markWord { |
226 | 206 | tmp |= ((hash & hash_mask) << hash_shift); |
227 | 207 | return markWord(tmp); |
228 | 208 | } |
229 | | - // it is only used to be stored into BasicLock as the |
230 | | - // indicator that the lock is using heavyweight monitor |
231 | | - static markWord unused_mark() { |
232 | | - return markWord(marked_value); |
233 | | - } |
234 | | - // the following two functions create the markWord to be |
235 | | - // stored into object header, it encodes monitor info |
236 | | - static markWord encode(BasicLock* lock) { |
237 | | - return from_pointer(lock); |
238 | | - } |
| 209 | + |
239 | 210 | static markWord encode(ObjectMonitor* monitor) { |
240 | 211 | assert(!UseObjectMonitorTable, "Locking with OM table does not use markWord for monitors"); |
241 | 212 | uintptr_t tmp = (uintptr_t) monitor; |
|
0 commit comments