< prev index next >
src/share/vm/gc/shared/barrierSet.hpp
Print this page
rev 8961 : [mq]: diff-shenandoah.patch
@@ -25,15 +25,18 @@
#ifndef SHARE_VM_GC_SHARED_BARRIERSET_HPP
#define SHARE_VM_GC_SHARED_BARRIERSET_HPP
#include "memory/memRegion.hpp"
#include "oops/oopsHierarchy.hpp"
+#include "asm/register.hpp"
#include "utilities/fakeRttiSupport.hpp"
// This class provides the interface between a barrier implementation and
// the rest of the system.
+class MacroAssembler;
+
class BarrierSet: public CHeapObj<mtGC> {
friend class VMStructs;
public:
// Fake RTTI support. For a derived class T to participate
// - T must have a corresponding Name entry.
@@ -50,11 +53,12 @@
ModRef, // ModRefBarrierSet
CardTableModRef, // CardTableModRefBS
CardTableForRS, // CardTableModRefBSForCTRS
CardTableExtension, // CardTableExtension
G1SATBCT, // G1SATBCardTableModRefBS
- G1SATBCTLogging // G1SATBCardTableLoggingModRefBS
+ G1SATBCTLogging, // G1SATBCardTableLoggingModRefBS
+ ShenandoahBarrierSet
};
protected:
typedef FakeRttiSupport<BarrierSet, Name> FakeRtti;
@@ -211,10 +215,31 @@
// within the heap, this function tells whether they are met.
virtual bool is_aligned(HeapWord* addr) = 0;
// Print a description of the memory for the barrier set
virtual void print_on(outputStream* st) const = 0;
+
+ virtual oop resolve_oop(oop src) {
+ return src;
+ }
+ virtual oop resolve_and_maybe_copy_oop(oop src) {
+ return src;
+ }
+
+#ifndef CC_INTERP
+ virtual void interpreter_read_barrier(MacroAssembler* masm, Register dst) {
+ // Default implementation does nothing.
+ }
+
+ virtual void interpreter_read_barrier_not_null(MacroAssembler* masm, Register dst) {
+ // Default implementation does nothing.
+ }
+
+ virtual void interpreter_write_barrier(MacroAssembler* masm, Register dst) {
+ // Default implementation does nothing.
+ }
+#endif
};
template<typename T>
inline T* barrier_set_cast(BarrierSet* bs) {
assert(bs->is_a(BarrierSet::GetName<T>::value), "wrong type of barrier set");
< prev index next >