14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_MEMORY_GENOOPCLOSURES_INLINE_HPP
26 #define SHARE_VM_MEMORY_GENOOPCLOSURES_INLINE_HPP
27
28 #include "memory/cardTableRS.hpp"
29 #include "memory/defNewGeneration.hpp"
30 #include "memory/genCollectedHeap.hpp"
31 #include "memory/genOopClosures.hpp"
32 #include "memory/genRemSet.hpp"
33 #include "memory/generation.hpp"
34 #include "memory/sharedHeap.hpp"
35 #include "memory/space.hpp"
36
37 inline OopsInGenClosure::OopsInGenClosure(Generation* gen) :
38 ExtendedOopClosure(gen->ref_processor()), _orig_gen(gen), _rs(NULL) {
39 set_generation(gen);
40 }
41
42 inline void OopsInGenClosure::set_generation(Generation* gen) {
43 _gen = gen;
44 _gen_boundary = _gen->reserved().start();
45 // Barrier set for the heap, must be set after heap is initialized
46 if (_rs == NULL) {
47 GenRemSet* rs = GenCollectedHeap::heap()->rem_set();
48 _rs = (CardTableRS*)rs;
49 }
50 }
51
52 template <class T> inline void OopsInGenClosure::do_barrier(T* p) {
53 assert(generation()->is_in_reserved(p), "expected ref in generation");
54 T heap_oop = oopDesc::load_heap_oop(p);
|
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_MEMORY_GENOOPCLOSURES_INLINE_HPP
26 #define SHARE_VM_MEMORY_GENOOPCLOSURES_INLINE_HPP
27
28 #include "memory/cardTableRS.hpp"
29 #include "memory/defNewGeneration.hpp"
30 #include "memory/genCollectedHeap.hpp"
31 #include "memory/genOopClosures.hpp"
32 #include "memory/genRemSet.hpp"
33 #include "memory/generation.hpp"
34 #include "memory/space.hpp"
35
36 inline OopsInGenClosure::OopsInGenClosure(Generation* gen) :
37 ExtendedOopClosure(gen->ref_processor()), _orig_gen(gen), _rs(NULL) {
38 set_generation(gen);
39 }
40
41 inline void OopsInGenClosure::set_generation(Generation* gen) {
42 _gen = gen;
43 _gen_boundary = _gen->reserved().start();
44 // Barrier set for the heap, must be set after heap is initialized
45 if (_rs == NULL) {
46 GenRemSet* rs = GenCollectedHeap::heap()->rem_set();
47 _rs = (CardTableRS*)rs;
48 }
49 }
50
51 template <class T> inline void OopsInGenClosure::do_barrier(T* p) {
52 assert(generation()->is_in_reserved(p), "expected ref in generation");
53 T heap_oop = oopDesc::load_heap_oop(p);
|