31 #include "gc/g1/g1FullGCOopClosures.hpp" |
31 #include "gc/g1/g1FullGCOopClosures.hpp" |
32 #include "gc/g1/heapRegionRemSet.hpp" |
32 #include "gc/g1/heapRegionRemSet.hpp" |
33 #include "memory/iterator.inline.hpp" |
33 #include "memory/iterator.inline.hpp" |
34 #include "oops/access.inline.hpp" |
34 #include "oops/access.inline.hpp" |
35 #include "oops/compressedOops.inline.hpp" |
35 #include "oops/compressedOops.inline.hpp" |
|
36 #include "oops/oop.inline.hpp" |
36 |
37 |
37 template <typename T> |
38 template <typename T> |
38 inline void G1MarkAndPushClosure::do_oop_nv(T* p) { |
39 inline void G1MarkAndPushClosure::do_oop_nv(T* p) { |
39 _marker->mark_and_push(p); |
40 _marker->mark_and_push(p); |
40 } |
41 } |
65 } |
66 } |
66 |
67 |
67 oop forwardee = obj->forwardee(); |
68 oop forwardee = obj->forwardee(); |
68 if (forwardee == NULL) { |
69 if (forwardee == NULL) { |
69 // Not forwarded, return current reference. |
70 // Not forwarded, return current reference. |
70 assert(obj->mark() == markOopDesc::prototype_for_object(obj) || // Correct mark |
71 assert(obj->mark_raw() == markOopDesc::prototype_for_object(obj) || // Correct mark |
71 obj->mark()->must_be_preserved(obj) || // Will be restored by PreservedMarksSet |
72 obj->mark_raw()->must_be_preserved(obj) || // Will be restored by PreservedMarksSet |
72 (UseBiasedLocking && obj->has_bias_pattern()), // Will be restored by BiasedLocking |
73 (UseBiasedLocking && obj->has_bias_pattern_raw()), // Will be restored by BiasedLocking |
73 "Must have correct prototype or be preserved, obj: " PTR_FORMAT ", mark: " PTR_FORMAT ", prototype: " PTR_FORMAT, |
74 "Must have correct prototype or be preserved, obj: " PTR_FORMAT ", mark: " PTR_FORMAT ", prototype: " PTR_FORMAT, |
74 p2i(obj), p2i(obj->mark()), p2i(markOopDesc::prototype_for_object(obj))); |
75 p2i(obj), p2i(obj->mark_raw()), p2i(markOopDesc::prototype_for_object(obj))); |
75 return; |
76 return; |
76 } |
77 } |
77 |
78 |
78 // Forwarded, just update. |
79 // Forwarded, just update. |
79 assert(Universe::heap()->is_in_reserved(forwardee), "should be in object space"); |
80 assert(Universe::heap()->is_in_reserved(forwardee), "should be in object space"); |