Mercurial > hg > graal-compiler
diff src/share/vm/oops/markOop.inline.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 | a61af66fc99e |
children | c18cbe5936b8 |
line wrap: on
line diff
--- a/src/share/vm/oops/markOop.inline.hpp Wed Jun 04 13:51:09 2008 -0700 +++ b/src/share/vm/oops/markOop.inline.hpp Thu Jun 05 15:57:56 2008 -0700 @@ -39,6 +39,12 @@ return (!is_unlocked() || !has_no_hash()); } +inline bool markOopDesc::must_be_preserved(oop obj_containing_mark) const { + if (!UseBiasedLocking) + return (!is_unlocked() || !has_no_hash()); + return must_be_preserved_with_bias(obj_containing_mark); +} + // Should this header (including its age bits) be preserved in the // case of a promotion failure during scavenge? inline bool markOopDesc::must_be_preserved_with_bias_for_promotion_failure(oop obj_containing_mark) const { @@ -59,6 +65,13 @@ return (this != prototype()); } +inline bool markOopDesc::must_be_preserved_for_promotion_failure(oop obj_containing_mark) const { + if (!UseBiasedLocking) + return (this != prototype()); + return must_be_preserved_with_bias_for_promotion_failure(obj_containing_mark); +} + + // Should this header (including its age bits) be preserved in the // case of a scavenge in which CMS is the old generation? inline bool markOopDesc::must_be_preserved_with_bias_for_cms_scavenge(klassOop klass_of_obj_containing_mark) const { @@ -70,6 +83,11 @@ } return (this != prototype()); } +inline bool markOopDesc::must_be_preserved_for_cms_scavenge(klassOop klass_of_obj_containing_mark) const { + if (!UseBiasedLocking) + return (this != prototype()); + return must_be_preserved_with_bias_for_cms_scavenge(klass_of_obj_containing_mark); +} inline markOop markOopDesc::prototype_for_object(oop obj) { #ifdef ASSERT