< prev index next >

src/hotspot/share/memory/allocation.hpp

Print this page

        

@@ -116,11 +116,10 @@
   f(mtThread,        "Thread")      /* thread objects                            */ \
   f(mtThreadStack,   "Thread Stack")                                                \
   f(mtCode,          "Code")        /* generated code                            */ \
   f(mtGC,            "GC")                                                          \
   f(mtCompiler,      "Compiler")                                                    \
-  f(mtJVMCI,         "JVMCI")                                                       \
   f(mtInternal,      "Internal")    /* memory used by VM, but does not belong to */ \
                                     /* any of above categories, and not used by  */ \
                                     /* NMT                                       */ \
   f(mtOther,         "Other")       /* memory not used by VM                     */ \
   f(mtSymbol,        "Symbol")                                                      \

@@ -128,11 +127,10 @@
   f(mtClassShared,   "Shared class space")      /* class data sharing            */ \
   f(mtChunk,         "Arena Chunk") /* chunk that holds content of arenas        */ \
   f(mtTest,          "Test")        /* Test type for verifying NMT               */ \
   f(mtTracing,       "Tracing")                                                     \
   f(mtLogging,       "Logging")                                                     \
-  f(mtStatistics,    "Statistics")                                                  \
   f(mtArguments,     "Arguments")                                                   \
   f(mtModule,        "Module")                                                      \
   f(mtSafepoint,     "Safepoint")                                                   \
   f(mtSynchronizer,  "Synchronization")                                             \
   f(mtNone,          "Unknown")                                                     \

@@ -252,41 +250,28 @@
   friend class VMStructs;
   // When CDS is enabled, all shared metaspace objects are mapped
   // into a single contiguous memory block, so we can use these
   // two pointers to quickly determine if something is in the
   // shared metaspace.
+  //
   // When CDS is not enabled, both pointers are set to NULL.
-  static void* _shared_metaspace_base;  // (inclusive) low address
-  static void* _shared_metaspace_top;   // (exclusive) high address
+  static void* _shared_metaspace_base; // (inclusive) low address
+  static void* _shared_metaspace_top;  // (exclusive) high address
 
  public:
-
-  // Returns true if the pointer points to a valid MetaspaceObj. A valid
-  // MetaspaceObj is MetaWord-aligned and contained within either
-  // non-shared or shared metaspace.
-  static bool is_valid(const MetaspaceObj* p);
-
-  static bool is_shared(const MetaspaceObj* p) {
+  bool is_metaspace_object() const;
+  bool is_shared() const {
     // If no shared metaspace regions are mapped, _shared_metaspace_{base,top} will
     // both be NULL and all values of p will be rejected quickly.
-    return (((void*)p) < _shared_metaspace_top &&
-            ((void*)p) >= _shared_metaspace_base);
+    return (((void*)this) < _shared_metaspace_top && ((void*)this) >= _shared_metaspace_base);
   }
-  bool is_shared() const { return MetaspaceObj::is_shared(this); }
-
   void print_address_on(outputStream* st) const;  // nonvirtual address printing
 
   static void set_shared_metaspace_range(void* base, void* top) {
     _shared_metaspace_base = base;
     _shared_metaspace_top = top;
   }
-
-  static void expand_shared_metaspace_range(void* top) {
-    assert(top >= _shared_metaspace_top, "must be");
-    _shared_metaspace_top = top;
-  }
-
   static void* shared_metaspace_base() { return _shared_metaspace_base; }
   static void* shared_metaspace_top()  { return _shared_metaspace_top;  }
 
 #define METASPACE_OBJ_TYPES_DO(f) \
   f(Class) \
< prev index next >