< prev index next > src/hotspot/share/gc/serial/markSweep.hpp
Print this page
#include "utilities/stack.hpp"
class ReferenceProcessor;
class DataLayout;
class SerialOldTracer;
+ class SlidingForwarding;
class STWGCTimer;
// MarkSweep takes care of global mark-compact garbage collection for a
// GenCollectedHeap using a four-phase pointer forwarding algorithm. All
// generations are assumed to support marking; those that can also support
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 int adjust_pointers(oop obj);
+ static int adjust_pointers(const SlidingForwarding* const forwarding, oop obj);
static void follow_stack(); // Empty marking stack.
static void follow_klass(Klass* klass);
static void follow_cld(ClassLoaderData* cld);
- template <class T> static inline void adjust_pointer(T* p);
+ template <class T> static inline void adjust_pointer(const SlidingForwarding* const forwarding, T* p);
// Check mark and maybe push on marking stack
template <class T> static void mark_and_push(T* p);
private:
set_ref_discoverer_internal(rd);
}
};
class AdjustPointerClosure: public BasicOopIterateClosure {
+ private:
+ const SlidingForwarding* const _forwarding;
public:
+ AdjustPointerClosure(const SlidingForwarding* forwarding) : _forwarding(forwarding) {}
template <typename T> void do_oop_work(T* p);
virtual void do_oop(oop* p);
virtual void do_oop(narrowOop* p);
virtual ReferenceIterationMode reference_iteration_mode() { return DO_FIELDS; }
};
void init(oop obj, markWord mark) {
_obj = obj;
_mark = mark;
}
- void adjust_pointer();
+ void adjust_pointer(const SlidingForwarding* const forwarding);
void restore();
};
#endif // SHARE_GC_SERIAL_MARKSWEEP_HPP
< prev index next >