--- a/hotspot/src/share/vm/memory/metaspaceShared.hpp Tue Dec 16 19:00:24 2014 -0500
+++ b/hotspot/src/share/vm/memory/metaspaceShared.hpp Wed Dec 17 23:34:52 2014 -0500
@@ -24,6 +24,7 @@
#ifndef SHARE_VM_MEMORY_METASPACE_SHARED_HPP
#define SHARE_VM_MEMORY_METASPACE_SHARED_HPP
+#include "classfile/compactHashtable.hpp"
#include "memory/allocation.hpp"
#include "memory/memRegion.hpp"
#include "runtime/virtualspace.hpp"
@@ -45,12 +46,21 @@
class FileMapInfo;
+class MetaspaceSharedStats VALUE_OBJ_CLASS_SPEC {
+public:
+ MetaspaceSharedStats() {
+ memset(this, 0, sizeof(*this));
+ }
+ CompactHashtableStats symbol;
+};
+
// Class Data Sharing Support
class MetaspaceShared : AllStatic {
// CDS support
static ReservedSpace* _shared_rs;
static int _max_alignment;
+ static MetaspaceSharedStats _stats;
static bool _link_classes_made_progress;
static bool _check_classes_made_progress;
static bool _has_error_classes;
@@ -123,6 +133,10 @@
char** mc_top, char* mc_end);
static void serialize(SerializeClosure* sc);
+ static MetaspaceSharedStats* stats() {
+ return &_stats;
+ }
+
// JVM/TI RedefineClasses() support:
// Remap the shared readonly space to shared readwrite, private if
// sharing is enabled. Simply returns true if sharing is not enabled