Mercurial > hg > truffle
comparison src/share/vm/oops/markOop.inline.hpp @ 360:5d254928c888
Merge
author | ysr |
---|---|
date | Wed, 27 Aug 2008 11:20:46 -0700 |
parents | 37f87013dfd8 |
children | c18cbe5936b8 |
comparison
equal
deleted
inserted
replaced
341:d60e4e6d7f72 | 360:5d254928c888 |
---|---|
37 return true; | 37 return true; |
38 } | 38 } |
39 return (!is_unlocked() || !has_no_hash()); | 39 return (!is_unlocked() || !has_no_hash()); |
40 } | 40 } |
41 | 41 |
42 inline bool markOopDesc::must_be_preserved(oop obj_containing_mark) const { | |
43 if (!UseBiasedLocking) | |
44 return (!is_unlocked() || !has_no_hash()); | |
45 return must_be_preserved_with_bias(obj_containing_mark); | |
46 } | |
47 | |
42 // Should this header (including its age bits) be preserved in the | 48 // Should this header (including its age bits) be preserved in the |
43 // case of a promotion failure during scavenge? | 49 // case of a promotion failure during scavenge? |
44 inline bool markOopDesc::must_be_preserved_with_bias_for_promotion_failure(oop obj_containing_mark) const { | 50 inline bool markOopDesc::must_be_preserved_with_bias_for_promotion_failure(oop obj_containing_mark) const { |
45 assert(UseBiasedLocking, "unexpected"); | 51 assert(UseBiasedLocking, "unexpected"); |
46 // We don't explicitly save off the mark words of biased and | 52 // We don't explicitly save off the mark words of biased and |
57 return true; | 63 return true; |
58 } | 64 } |
59 return (this != prototype()); | 65 return (this != prototype()); |
60 } | 66 } |
61 | 67 |
68 inline bool markOopDesc::must_be_preserved_for_promotion_failure(oop obj_containing_mark) const { | |
69 if (!UseBiasedLocking) | |
70 return (this != prototype()); | |
71 return must_be_preserved_with_bias_for_promotion_failure(obj_containing_mark); | |
72 } | |
73 | |
74 | |
62 // Should this header (including its age bits) be preserved in the | 75 // Should this header (including its age bits) be preserved in the |
63 // case of a scavenge in which CMS is the old generation? | 76 // case of a scavenge in which CMS is the old generation? |
64 inline bool markOopDesc::must_be_preserved_with_bias_for_cms_scavenge(klassOop klass_of_obj_containing_mark) const { | 77 inline bool markOopDesc::must_be_preserved_with_bias_for_cms_scavenge(klassOop klass_of_obj_containing_mark) const { |
65 assert(UseBiasedLocking, "unexpected"); | 78 assert(UseBiasedLocking, "unexpected"); |
66 // CMS scavenges preserve mark words in similar fashion to promotion failures; see above | 79 // CMS scavenges preserve mark words in similar fashion to promotion failures; see above |
68 klass_of_obj_containing_mark->klass_part()->prototype_header()->has_bias_pattern()) { | 81 klass_of_obj_containing_mark->klass_part()->prototype_header()->has_bias_pattern()) { |
69 return true; | 82 return true; |
70 } | 83 } |
71 return (this != prototype()); | 84 return (this != prototype()); |
72 } | 85 } |
86 inline bool markOopDesc::must_be_preserved_for_cms_scavenge(klassOop klass_of_obj_containing_mark) const { | |
87 if (!UseBiasedLocking) | |
88 return (this != prototype()); | |
89 return must_be_preserved_with_bias_for_cms_scavenge(klass_of_obj_containing_mark); | |
90 } | |
73 | 91 |
74 inline markOop markOopDesc::prototype_for_object(oop obj) { | 92 inline markOop markOopDesc::prototype_for_object(oop obj) { |
75 #ifdef ASSERT | 93 #ifdef ASSERT |
76 markOop prototype_header = obj->klass()->klass_part()->prototype_header(); | 94 markOop prototype_header = obj->klass()->klass_part()->prototype_header(); |
77 assert(prototype_header == prototype() || prototype_header->has_bias_pattern(), "corrupt prototype header"); | 95 assert(prototype_header == prototype() || prototype_header->has_bias_pattern(), "corrupt prototype header"); |