comparison src/share/vm/oops/markOop.hpp @ 9049:fea2c7f50ce8

8217676: Upgrade libpng to 1.6.37 Reviewed-by: prr, jdv, kcr
author zgu
date Thu, 12 Sep 2019 15:29:50 -0400
parents da91efe96a93
children
comparison
equal deleted inserted replaced
13:2dee743bcba7 14:22bb34446913
316 } 316 }
317 static markOop encode(ObjectMonitor* monitor) { 317 static markOop encode(ObjectMonitor* monitor) {
318 intptr_t tmp = (intptr_t) monitor; 318 intptr_t tmp = (intptr_t) monitor;
319 return (markOop) (tmp | monitor_value); 319 return (markOop) (tmp | monitor_value);
320 } 320 }
321 static markOop encode(JavaThread* thread, int age, int bias_epoch) { 321 static markOop encode(JavaThread* thread, uint age, int bias_epoch) {
322 intptr_t tmp = (intptr_t) thread; 322 intptr_t tmp = (intptr_t) thread;
323 assert(UseBiasedLocking && ((tmp & (epoch_mask_in_place | age_mask_in_place | biased_lock_mask_in_place)) == 0), "misaligned JavaThread pointer"); 323 assert(UseBiasedLocking && ((tmp & (epoch_mask_in_place | age_mask_in_place | biased_lock_mask_in_place)) == 0), "misaligned JavaThread pointer");
324 assert(age <= max_age, "age too large"); 324 assert(age <= max_age, "age too large");
325 assert(bias_epoch <= max_bias_epoch, "bias epoch too large"); 325 assert(bias_epoch <= max_bias_epoch, "bias epoch too large");
326 return (markOop) (tmp | (bias_epoch << epoch_shift) | (age << age_shift) | biased_lock_pattern); 326 return (markOop) (tmp | (bias_epoch << epoch_shift) | (age << age_shift) | biased_lock_pattern);
331 331
332 // age operations 332 // age operations
333 markOop set_marked() { return markOop((value() & ~lock_mask_in_place) | marked_value); } 333 markOop set_marked() { return markOop((value() & ~lock_mask_in_place) | marked_value); }
334 markOop set_unmarked() { return markOop((value() & ~lock_mask_in_place) | unlocked_value); } 334 markOop set_unmarked() { return markOop((value() & ~lock_mask_in_place) | unlocked_value); }
335 335
336 int age() const { return mask_bits(value() >> age_shift, age_mask); } 336 uint age() const { return mask_bits(value() >> age_shift, age_mask); }
337 markOop set_age(int v) const { 337 markOop set_age(uint v) const {
338 assert((v & ~age_mask) == 0, "shouldn't overflow age field"); 338 assert((v & ~age_mask) == 0, "shouldn't overflow age field");
339 return markOop((value() & ~age_mask_in_place) | (((intptr_t)v & age_mask) << age_shift)); 339 return markOop((value() & ~age_mask_in_place) | (((uintptr_t)v & age_mask) << age_shift));
340 } 340 }
341 markOop incr_age() const { return age() == max_age ? markOop(this) : set_age(age() + 1); } 341 markOop incr_age() const { return age() == max_age ? markOop(this) : set_age(age() + 1); }
342 342
343 // hash operations 343 // hash operations
344 intptr_t hash() const { 344 intptr_t hash() const {