8046070: Class Data Sharing clean up and refactoring

Cleaned up CDS to be more configurable, maintainable and extensible

Reviewed-by: dholmes, coleenp, acorn, mchung
This commit is contained in:
Ioi Lam 2014-08-12 17:29:00 -07:00
parent 1fec07f4bf
commit bbe6f51f81
42 changed files with 2087 additions and 434 deletions

View file

@ -79,6 +79,12 @@ class MetadataFactory : AllStatic {
// Deallocation method for metadata
template <class T>
static void free_metadata(ClassLoaderData* loader_data, T md) {
if (DumpSharedSpaces) {
// FIXME: the freeing code is buggy, especially when PrintSharedSpaces is enabled.
// Disable for now -- this means if you specify bad classes in your classlist you
// may have wasted space inside the archive.
return;
}
if (md != NULL) {
assert(loader_data != NULL, "shouldn't pass null");
int size = md->size();