< prev index next >
src/hotspot/share/memory/metaspaceShared.cpp
Print this page
*** 62,71 ****
--- 62,72 ----
#include "runtime/vmThread.hpp"
#include "runtime/vm_operations.hpp"
#include "utilities/align.hpp"
#include "utilities/bitMap.hpp"
#include "utilities/defaultStream.hpp"
+ #include "utilities/expandableResourceHash.hpp"
#include "utilities/hashtable.inline.hpp"
#if INCLUDE_G1GC
#include "gc/g1/g1CollectedHeap.hpp"
#endif
*** 1076,1096 ****
class ArchiveCompactor : AllStatic {
static DumpAllocStats* _alloc_stats;
static SortedSymbolClosure* _ssc;
static unsigned my_hash(const address& a) {
return primitive_hash<address>(a);
}
static bool my_equals(const address& a0, const address& a1) {
return primitive_equals<address>(a0, a1);
}
! typedef ResourceHashtable<
address, address,
ArchiveCompactor::my_hash, // solaris compiler doesn't like: primitive_hash<address>
ArchiveCompactor::my_equals, // solaris compiler doesn't like: primitive_equals<address>
! 16384, ResourceObj::C_HEAP> RelocationTable;
static RelocationTable* _new_loc_table;
public:
static void initialize() {
_alloc_stats = new(ResourceObj::C_HEAP, mtInternal)DumpAllocStats;
--- 1077,1099 ----
class ArchiveCompactor : AllStatic {
static DumpAllocStats* _alloc_stats;
static SortedSymbolClosure* _ssc;
+ public: // <-- solaris compiler wants this
static unsigned my_hash(const address& a) {
return primitive_hash<address>(a);
}
static bool my_equals(const address& a0, const address& a1) {
return primitive_equals<address>(a0, a1);
}
! private:
! typedef ExpandableResourceHashtable<
address, address,
ArchiveCompactor::my_hash, // solaris compiler doesn't like: primitive_hash<address>
ArchiveCompactor::my_equals, // solaris compiler doesn't like: primitive_equals<address>
! 8087, 8, ResourceObj::C_HEAP> RelocationTable;
static RelocationTable* _new_loc_table;
public:
static void initialize() {
_alloc_stats = new(ResourceObj::C_HEAP, mtInternal)DumpAllocStats;
*** 1382,1403 ****
--- 1385,1421 ----
ClassLoaderDataGraph::loaded_classes_do(&collect_classes);
tty->print_cr("Number of classes %d", _global_klass_objects->length());
{
int num_type_array = 0, num_obj_array = 0, num_inst = 0;
+ int num_boot = 0, num_platform = 0, num_app = 0, num_unregistered = 0;
for (int i = 0; i < _global_klass_objects->length(); i++) {
Klass* k = _global_klass_objects->at(i);
if (k->is_instance_klass()) {
num_inst ++;
+ InstanceKlass* ik = InstanceKlass::cast(k);
+ if (ik->shared_classpath_index() == UNREGISTERED_INDEX) {
+ num_unregistered ++;
+ } else if (ik->is_shared_boot_class()) {
+ num_boot ++;
+ } else if (ik->is_shared_platform_class()) {
+ num_platform ++;
+ } else if (ik->is_shared_app_class()) {
+ num_app ++;
+ }
} else if (k->is_objArray_klass()) {
num_obj_array ++;
} else {
assert(k->is_typeArray_klass(), "sanity");
num_type_array ++;
}
}
tty->print_cr(" instance classes = %5d", num_inst);
+ tty->print_cr(" boot = %5d", num_boot);
+ tty->print_cr(" platform = %5d", num_platform);
+ tty->print_cr(" app = %5d", num_app);
+ tty->print_cr(" unregistered = %5d", num_unregistered);
tty->print_cr(" obj array classes = %5d", num_obj_array);
tty->print_cr(" type array classes = %5d", num_type_array);
}
// Ensure the ConstMethods won't be modified at run-time
< prev index next >