1.1 --- a/src/share/vm/oops/markOop.inline.hpp Wed Jun 04 13:51:09 2008 -0700 1.2 +++ b/src/share/vm/oops/markOop.inline.hpp Thu Jun 05 15:57:56 2008 -0700 1.3 @@ -39,6 +39,12 @@ 1.4 return (!is_unlocked() || !has_no_hash()); 1.5 } 1.6 1.7 +inline bool markOopDesc::must_be_preserved(oop obj_containing_mark) const { 1.8 + if (!UseBiasedLocking) 1.9 + return (!is_unlocked() || !has_no_hash()); 1.10 + return must_be_preserved_with_bias(obj_containing_mark); 1.11 +} 1.12 + 1.13 // Should this header (including its age bits) be preserved in the 1.14 // case of a promotion failure during scavenge? 1.15 inline bool markOopDesc::must_be_preserved_with_bias_for_promotion_failure(oop obj_containing_mark) const { 1.16 @@ -59,6 +65,13 @@ 1.17 return (this != prototype()); 1.18 } 1.19 1.20 +inline bool markOopDesc::must_be_preserved_for_promotion_failure(oop obj_containing_mark) const { 1.21 + if (!UseBiasedLocking) 1.22 + return (this != prototype()); 1.23 + return must_be_preserved_with_bias_for_promotion_failure(obj_containing_mark); 1.24 +} 1.25 + 1.26 + 1.27 // Should this header (including its age bits) be preserved in the 1.28 // case of a scavenge in which CMS is the old generation? 1.29 inline bool markOopDesc::must_be_preserved_with_bias_for_cms_scavenge(klassOop klass_of_obj_containing_mark) const { 1.30 @@ -70,6 +83,11 @@ 1.31 } 1.32 return (this != prototype()); 1.33 } 1.34 +inline bool markOopDesc::must_be_preserved_for_cms_scavenge(klassOop klass_of_obj_containing_mark) const { 1.35 + if (!UseBiasedLocking) 1.36 + return (this != prototype()); 1.37 + return must_be_preserved_with_bias_for_cms_scavenge(klass_of_obj_containing_mark); 1.38 +} 1.39 1.40 inline markOop markOopDesc::prototype_for_object(oop obj) { 1.41 #ifdef ASSERT