comparison src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp @ 3765:ae5b2f1dcf12

7045662: G1: OopsInHeapRegionClosure::set_region() should not be virtual Summary: make the method non-virtual, remove five unused closures, and fix a couple of copyright typos. Reviewed-by: stefank, johnc, poonam
author tonyp
date Wed, 08 Jun 2011 21:48:38 -0400
parents f95d63e2154a
children 842b840e67db
comparison
equal deleted inserted replaced
3764:053d84a76d3d 3765:ae5b2f1dcf12
1 /* 1 /*
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
64 #endif 64 #endif
65 } 65 }
66 } 66 }
67 } 67 }
68 68
69 template <class T> inline void FilterInHeapRegionAndIntoCSClosure::do_oop_nv(T* p) {
70 T heap_oop = oopDesc::load_heap_oop(p);
71 if (!oopDesc::is_null(heap_oop) &&
72 _g1->obj_in_cs(oopDesc::decode_heap_oop_not_null(heap_oop)))
73 _oc->do_oop(p);
74 }
75
76 template <class T> inline void FilterAndMarkInHeapRegionAndIntoCSClosure::do_oop_nv(T* p) {
77 T heap_oop = oopDesc::load_heap_oop(p);
78 if (!oopDesc::is_null(heap_oop)) {
79 oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
80 HeapRegion* hr = _g1->heap_region_containing((HeapWord*) obj);
81 if (hr != NULL) {
82 if (hr->in_collection_set())
83 _oc->do_oop(p);
84 else if (!hr->is_young())
85 _cm->grayRoot(obj);
86 }
87 }
88 }
89
90 // This closure is applied to the fields of the objects that have just been copied. 69 // This closure is applied to the fields of the objects that have just been copied.
91 template <class T> inline void G1ParScanClosure::do_oop_nv(T* p) { 70 template <class T> inline void G1ParScanClosure::do_oop_nv(T* p) {
92 T heap_oop = oopDesc::load_heap_oop(p); 71 T heap_oop = oopDesc::load_heap_oop(p);
93 72
94 if (!oopDesc::is_null(heap_oop)) { 73 if (!oopDesc::is_null(heap_oop)) {