< prev index next > src/hotspot/share/gc/serial/markSweep.hpp
Print this page
// Class unloading will only occur when a full gc is invoked.
// declared at end
class PreservedMark;
class MarkAndPushClosure;
- class AdjustPointerClosure;
class MarkSweep : AllStatic {
//
// Inline closure decls
//
};
//
// Friend decls
//
- friend class AdjustPointerClosure;
friend class KeepAliveClosure;
//
// Vars
//
static IsAliveClosure is_alive;
static FollowRootClosure follow_root_closure;
static MarkAndPushClosure mark_and_push_closure;
static FollowStackClosure follow_stack_closure;
static CLDToOopClosure follow_cld_closure;
- static AdjustPointerClosure adjust_pointer_closure;
- static CLDToOopClosure adjust_cld_closure;
// Accessors
static uint total_invocations() { return _total_invocations; }
// Reference Processing
static void preserve_mark(oop p, markWord mark);
// Save the mark word so it can be restored later
static void adjust_marks(); // Adjust the pointers in the preserved marks table
static void restore_marks(); // Restore the marks that we saved in preserve_mark
static size_t adjust_pointers(oop obj);
static void follow_stack(); // Empty marking stack.
! template <class T> static inline void adjust_pointer(T* p);
// Check mark and maybe push on marking stack
template <class T> static void mark_and_push(T* p);
private:
// Call backs for marking
static void mark_object(oop obj);
// Mark pointer and follow contents. Empty marking stack afterwards.
template <class T> static inline void follow_root(T* p);
static void preserve_mark(oop p, markWord mark);
// Save the mark word so it can be restored later
static void adjust_marks(); // Adjust the pointers in the preserved marks table
static void restore_marks(); // Restore the marks that we saved in preserve_mark
+ template <bool ALT_FWD>
static size_t adjust_pointers(oop obj);
static void follow_stack(); // Empty marking stack.
! template <bool ALT_FWD, class T>
+ static void adjust_pointer(T* p);
// Check mark and maybe push on marking stack
template <class T> static void mark_and_push(T* p);
private:
+ template <bool ALT_FWD>
+ static void adjust_marks_impl();
+
// Call backs for marking
static void mark_object(oop obj);
// Mark pointer and follow contents. Empty marking stack afterwards.
template <class T> static inline void follow_root(T* p);
void set_ref_discoverer(ReferenceDiscoverer* rd) {
set_ref_discoverer_internal(rd);
}
};
+ template <bool ALT_FWD>
class AdjustPointerClosure: public BasicOopIterateClosure {
public:
template <typename T> void do_oop_work(T* p);
virtual void do_oop(oop* p);
virtual void do_oop(narrowOop* p);
oop _obj;
markWord _mark;
public:
PreservedMark(oop obj, markWord mark) : _obj(obj), _mark(mark) {}
+ template <bool ALT_FWD>
void adjust_pointer();
void restore();
};
#endif // SHARE_GC_SERIAL_MARKSWEEP_HPP
< prev index next >