--- old/src/share/vm/memory/metaspace.cpp 2014-03-05 17:27:06.682776954 +0100 +++ new/src/share/vm/memory/metaspace.cpp 2014-03-05 17:27:06.586776949 +0100 @@ -3355,6 +3355,8 @@ MetaWord* result = loader_data->metaspace_non_null()->allocate(word_size, mdtype); if (result == NULL) { + tracer()->report_metaspace_allocation_failure(loader_data, word_size, type, mdtype); + // Allocation failed. if (is_init_completed()) { // Only start a GC if the bootstrapping has completed. @@ -3423,6 +3425,16 @@ } } +const char* Metaspace::metadata_type_name(Metaspace::MetadataType mdtype) { + switch (mdtype) { + case Metaspace::ClassType: return "Class Type"; + case Metaspace::NonClassType: return "Non Class Type"; + default: + assert(false, err_msg("Got bad mdtype: %d", (int) mdtype)); + return NULL; + } +} + void Metaspace::record_allocation(void* ptr, MetaspaceObj::Type type, size_t word_size) { assert(DumpSharedSpaces, "sanity");