< prev index next >

src/hotspot/share/gc/g1/g1FullGCOopClosures.inline.hpp

Print this page

 46 inline void G1MarkAndPushClosure::do_oop(oop* p) {
 47   do_oop_work(p);
 48 }
 49 
 50 inline void G1MarkAndPushClosure::do_oop(narrowOop* p) {
 51   do_oop_work(p);
 52 }
 53 
 54 inline bool G1MarkAndPushClosure::do_metadata() {
 55   return true;
 56 }
 57 
 58 inline void G1MarkAndPushClosure::do_klass(Klass* k) {
 59   _marker->follow_klass(k);
 60 }
 61 
 62 inline void G1MarkAndPushClosure::do_cld(ClassLoaderData* cld) {
 63   _marker->follow_cld(cld);
 64 }
 65 








 66 template <class T> inline void G1AdjustClosure::adjust_pointer(T* p) {
 67   T heap_oop = RawAccess<>::oop_load(p);
 68   if (CompressedOops::is_null(heap_oop)) {
 69     return;
 70   }
 71 
 72   oop obj = CompressedOops::decode_not_null(heap_oop);
 73   assert(Universe::heap()->is_in(obj), "should be in heap");
 74   if (!_collector->is_compacting(obj)) {
 75     // We never forward objects in non-compacting regions so there is no need to
 76     // process them further.
 77     return;
 78   }
 79 
 80   oop forwardee = obj->forwardee();
 81   if (forwardee == NULL) {
 82     // Not forwarded, return current reference.
 83     assert(obj->mark() == markWord::prototype() || // Correct mark
 84            obj->mark_must_be_preserved(), // Will be restored by PreservedMarksSet
 85            "Must have correct prototype or be preserved, obj: " PTR_FORMAT ", mark: " PTR_FORMAT ", prototype: " PTR_FORMAT,

 46 inline void G1MarkAndPushClosure::do_oop(oop* p) {
 47   do_oop_work(p);
 48 }
 49 
 50 inline void G1MarkAndPushClosure::do_oop(narrowOop* p) {
 51   do_oop_work(p);
 52 }
 53 
 54 inline bool G1MarkAndPushClosure::do_metadata() {
 55   return true;
 56 }
 57 
 58 inline void G1MarkAndPushClosure::do_klass(Klass* k) {
 59   _marker->follow_klass(k);
 60 }
 61 
 62 inline void G1MarkAndPushClosure::do_cld(ClassLoaderData* cld) {
 63   _marker->follow_cld(cld);
 64 }
 65 
 66 inline void G1MarkAndPushClosure::do_method(Method* m) {
 67   m->record_marking_cycle();
 68 }
 69 
 70 inline void G1MarkAndPushClosure::do_nmethod(nmethod* nm) {
 71   nm->follow_nmethod(this);
 72 }
 73 
 74 template <class T> inline void G1AdjustClosure::adjust_pointer(T* p) {
 75   T heap_oop = RawAccess<>::oop_load(p);
 76   if (CompressedOops::is_null(heap_oop)) {
 77     return;
 78   }
 79 
 80   oop obj = CompressedOops::decode_not_null(heap_oop);
 81   assert(Universe::heap()->is_in(obj), "should be in heap");
 82   if (!_collector->is_compacting(obj)) {
 83     // We never forward objects in non-compacting regions so there is no need to
 84     // process them further.
 85     return;
 86   }
 87 
 88   oop forwardee = obj->forwardee();
 89   if (forwardee == NULL) {
 90     // Not forwarded, return current reference.
 91     assert(obj->mark() == markWord::prototype() || // Correct mark
 92            obj->mark_must_be_preserved(), // Will be restored by PreservedMarksSet
 93            "Must have correct prototype or be preserved, obj: " PTR_FORMAT ", mark: " PTR_FORMAT ", prototype: " PTR_FORMAT,
< prev index next >