12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
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 #include "precompiled.hpp"
26 #include "memory/iterator.inline.hpp"
27 #include "memory/universe.hpp"
28 #include "oops/oop.inline.hpp"
29 #include "utilities/debug.hpp"
30 #include "utilities/globalDefinitions.hpp"
31
32 void KlassToOopClosure::do_klass(Klass* k) {
33 assert(_oop_closure != NULL, "Not initialized?");
34 k->oops_do(_oop_closure);
35 }
36
37 void CLDToOopClosure::do_cld(ClassLoaderData* cld) {
38 cld->oops_do(_oop_closure, &_klass_closure, _must_claim_cld);
39 }
40
41 void CLDToKlassAndOopClosure::do_cld(ClassLoaderData* cld) {
42 cld->oops_do(_oop_closure, _klass_closure, _must_claim_cld);
43 }
44
45 void ObjectToOopClosure::do_object(oop obj) {
46 obj->oop_iterate(_cl);
47 }
48
49 void VoidClosure::do_void() {
50 ShouldNotCallThis();
51 }
52
53 void CodeBlobToOopClosure::do_nmethod(nmethod* nm) {
54 nm->oops_do(_cl);
55 if (_fix_relocations) {
56 nm->fix_oop_relocations();
57 }
58 }
59
60 void CodeBlobToOopClosure::do_code_blob(CodeBlob* cb) {
61 nmethod* nm = cb->as_nmethod_or_null();
62 if (nm != NULL) {
|
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
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 #include "precompiled.hpp"
26 #include "memory/iterator.inline.hpp"
27 #include "memory/universe.hpp"
28 #include "oops/oop.inline.hpp"
29 #include "utilities/debug.hpp"
30 #include "utilities/globalDefinitions.hpp"
31
32 void CLDToOopClosure::do_cld(ClassLoaderData* cld) {
33 cld->oops_do(_oop_closure, _must_claim_cld);
34 }
35
36 void ObjectToOopClosure::do_object(oop obj) {
37 obj->oop_iterate(_cl);
38 }
39
40 void VoidClosure::do_void() {
41 ShouldNotCallThis();
42 }
43
44 void CodeBlobToOopClosure::do_nmethod(nmethod* nm) {
45 nm->oops_do(_cl);
46 if (_fix_relocations) {
47 nm->fix_oop_relocations();
48 }
49 }
50
51 void CodeBlobToOopClosure::do_code_blob(CodeBlob* cb) {
52 nmethod* nm = cb->as_nmethod_or_null();
53 if (nm != NULL) {
|