src/share/vm/oops/methodKlass.cpp
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -110,26 +110,20 @@
m->set_prev_time(0);
#endif
assert(m->is_parsable(), "must be parsable here.");
assert(m->size() == size, "wrong size for object");
- // We should not publish an uprasable object's reference
- // into one that is parsable, since that presents problems
- // for the concurrent parallel marking and precleaning phases
- // of concurrent gc (CMS).
- xconst->set_method(m);
return m;
}
void methodKlass::oop_follow_contents(oop obj) {
assert (obj->is_method(), "object must be method");
methodOop m = methodOop(obj);
// Performance tweak: We skip iterating over the klass pointer since we
// know that Universe::methodKlassObj never moves.
MarkSweep::mark_and_push(m->adr_constMethod());
- MarkSweep::mark_and_push(m->adr_constants());
if (m->method_data() != NULL) {
MarkSweep::mark_and_push(m->adr_method_data());
}
}
@@ -139,11 +133,10 @@
assert (obj->is_method(), "object must be method");
methodOop m = methodOop(obj);
// Performance tweak: We skip iterating over the klass pointer since we
// know that Universe::methodKlassObj never moves.
PSParallelCompact::mark_and_push(cm, m->adr_constMethod());
- PSParallelCompact::mark_and_push(cm, m->adr_constants());
#ifdef COMPILER2
if (m->method_data() != NULL) {
PSParallelCompact::mark_and_push(cm, m->adr_method_data());
}
#endif // COMPILER2
@@ -157,11 +150,10 @@
// Don't call size() or oop_size() since that is a virtual call.
int size = m->object_size();
// Performance tweak: We skip iterating over the klass pointer since we
// know that Universe::methodKlassObj never moves
blk->do_oop(m->adr_constMethod());
- blk->do_oop(m->adr_constants());
if (m->method_data() != NULL) {
blk->do_oop(m->adr_method_data());
}
return size;
}
@@ -176,12 +168,10 @@
// Performance tweak: We skip iterating over the klass pointer since we
// know that Universe::methodKlassObj never moves.
oop* adr;
adr = m->adr_constMethod();
if (mr.contains(adr)) blk->do_oop(adr);
- adr = m->adr_constants();
- if (mr.contains(adr)) blk->do_oop(adr);
if (m->method_data() != NULL) {
adr = m->adr_method_data();
if (mr.contains(adr)) blk->do_oop(adr);
}
return size;
@@ -195,11 +185,10 @@
// Don't call size() or oop_size() since that is a virtual call.
int size = m->object_size();
// Performance tweak: We skip iterating over the klass pointer since we
// know that Universe::methodKlassObj never moves.
MarkSweep::adjust_pointer(m->adr_constMethod());
- MarkSweep::adjust_pointer(m->adr_constants());
if (m->method_data() != NULL) {
MarkSweep::adjust_pointer(m->adr_method_data());
}
return size;
}
@@ -211,11 +200,10 @@
int methodKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
assert(obj->is_method(), "should be method");
methodOop m = methodOop(obj);
PSParallelCompact::adjust_pointer(m->adr_constMethod());
- PSParallelCompact::adjust_pointer(m->adr_constants());
#ifdef COMPILER2
if (m->method_data() != NULL) {
PSParallelCompact::adjust_pointer(m->adr_method_data());
}
#endif // COMPILER2
@@ -337,12 +325,10 @@
Klass::oop_verify_on(obj, st);
guarantee(obj->is_method(), "object must be method");
if (!obj->partially_loaded()) {
methodOop m = methodOop(obj);
guarantee(m->is_perm(), "should be in permspace");
- guarantee(m->constants()->is_perm(), "should be in permspace");
- guarantee(m->constants()->is_constantPool(), "should be constant pool");
guarantee(m->constMethod()->is_constMethod(), "should be constMethodOop");
guarantee(m->constMethod()->is_perm(), "should be in permspace");
methodDataOop method_data = m->method_data();
guarantee(method_data == NULL ||
method_data->is_perm(), "should be in permspace");