6964458: Reimplement class meta-data storage to use native memory

Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes

Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com>
Co-authored-by: Mikael Gerdin <mikael.gerdin@oracle.com>
Co-authored-by: Tom Rodriguez <tom.rodriguez@oracle.com>
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
This commit is contained in:
Jon Masamitsu 2012-09-01 13:25:18 -04:00 committed by Coleen Phillimore
parent 36eee7c8c8
commit 5c58d27aac
853 changed files with 26124 additions and 82956 deletions

View file

@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
#include "classfile/altHashing.hpp"
#include "classfile/javaClasses.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/handles.inline.hpp"
@ -48,7 +49,7 @@ void oopDesc::print_on(outputStream* st) const {
if (this == NULL) {
st->print_cr("NULL");
} else {
blueprint()->oop_print_on(oop(this), st);
klass()->oop_print_on(oop(this), st);
}
}
@ -86,19 +87,15 @@ void oopDesc::print_value_on(outputStream* st) const {
} else if (java_lang_String::is_instance(obj)) {
java_lang_String::print(obj, st);
if (PrintOopAddress) print_address_on(st);
#ifdef ASSERT
} else if (!Universe::heap()->is_in(obj) || !Universe::heap()->is_in(klass())) {
st->print("### BAD OOP %p ###", (address)obj);
#endif //ASSERT
} else {
blueprint()->oop_print_value_on(obj, st);
klass()->oop_print_value_on(obj, st);
}
}
void oopDesc::verify_on(outputStream* st) {
if (this != NULL) {
blueprint()->oop_verify_on(this, st);
klass()->oop_verify_on(this, st);
}
}
@ -107,25 +104,23 @@ void oopDesc::verify() {
verify_on(tty);
}
bool oopDesc::partially_loaded() {
return blueprint()->oop_partially_loaded(this);
}
void oopDesc::set_partially_loaded() {
blueprint()->oop_set_partially_loaded(this);
}
intptr_t oopDesc::slow_identity_hash() {
// slow case; we have to acquire the micro lock in order to locate the header
ResetNoHandleMark rnm; // Might be called from LEAF/QUICK ENTRY
HandleMark hm;
Handle object((oop)this);
assert(!is_shared_readonly(), "using identity hash on readonly object?");
Handle object(this);
return ObjectSynchronizer::identity_hash_value_for(object);
}
// When String table needs to rehash
unsigned int oopDesc::new_hash(jint seed) {
ResourceMark rm;
int length;
jchar* chars = java_lang_String::as_unicode_string(this, length);
// Use alternate hashing algorithm on the string
return AltHashing::murmur3_32(seed, chars, length);
}
VerifyOopClosure VerifyOopClosure::verify_oop;
void VerifyOopClosure::do_oop(oop* p) { VerifyOopClosure::do_oop_work(p); }