src/share/vm/memory/modRefBarrierSet.hpp

changeset 777
37f87013dfd8
parent 548
ba764ed4b6f2
child 791
1ee8caae33af
equal deleted inserted replaced
624:0b27f3512f9e 777:37f87013dfd8
29 class OopClosure; 29 class OopClosure;
30 class Generation; 30 class Generation;
31 31
32 class ModRefBarrierSet: public BarrierSet { 32 class ModRefBarrierSet: public BarrierSet {
33 public: 33 public:
34
35 ModRefBarrierSet() { _kind = BarrierSet::ModRef; }
36
37 bool is_a(BarrierSet::Name bsn) {
38 return bsn == BarrierSet::ModRef;
39 }
40
34 // Barriers only on ref writes. 41 // Barriers only on ref writes.
35 bool has_read_ref_barrier() { return false; } 42 bool has_read_ref_barrier() { return false; }
36 bool has_read_prim_barrier() { return false; } 43 bool has_read_prim_barrier() { return false; }
37 bool has_write_ref_barrier() { return true; } 44 bool has_write_ref_barrier() { return true; }
38 bool has_write_prim_barrier() { return false; } 45 bool has_write_prim_barrier() { return false; }
83 // after the last call to "save_marks" on "sp" will not be considered. 90 // after the last call to "save_marks" on "sp" will not be considered.
84 virtual void mod_oop_in_space_iterate(Space* sp, OopClosure* cl, 91 virtual void mod_oop_in_space_iterate(Space* sp, OopClosure* cl,
85 bool clear = false, 92 bool clear = false,
86 bool before_save_marks = false) = 0; 93 bool before_save_marks = false) = 0;
87 94
88 // Causes all refs in "mr" to be assumed to be modified. 95 // Causes all refs in "mr" to be assumed to be modified. If "whole_heap"
89 virtual void invalidate(MemRegion mr) = 0; 96 // is true, the caller asserts that the entire heap is being invalidated,
97 // which may admit an optimized implementation for some barriers.
98 virtual void invalidate(MemRegion mr, bool whole_heap = false) = 0;
90 99
91 // The caller guarantees that "mr" contains no references. (Perhaps it's 100 // The caller guarantees that "mr" contains no references. (Perhaps it's
92 // objects have been moved elsewhere.) 101 // objects have been moved elsewhere.)
93 virtual void clear(MemRegion mr) = 0; 102 virtual void clear(MemRegion mr) = 0;
94 103

mercurial