--- a/hotspot/src/share/vm/oops/instanceKlass.hpp Fri Dec 07 10:55:16 2012 -0800
+++ b/hotspot/src/share/vm/oops/instanceKlass.hpp Wed Dec 12 11:39:29 2012 -0500
@@ -538,6 +538,12 @@
}
}
+ // Oop that keeps the metadata for this class from being unloaded
+ // in places where the metadata is stored in other places, like nmethods
+ oop klass_holder() const {
+ return is_anonymous() ? java_mirror() : class_loader();
+ }
+
// signers
objArrayOop signers() const { return _signers; }
void set_signers(objArrayOop s) { klass_oop_store((oop*)&_signers, s); }