src/share/vm/memory/metaspace.hpp

Print this page
rev 6070 : 8036699: Add trace event when a metaspace allocation fails


 224   size_t used_bytes_slow(MetadataType mdtype) const;
 225   size_t capacity_bytes_slow(MetadataType mdtype) const;
 226 
 227   static MetaWord* allocate(ClassLoaderData* loader_data, size_t word_size,
 228                             bool read_only, MetaspaceObj::Type type, TRAPS);
 229   void deallocate(MetaWord* ptr, size_t byte_size, bool is_class);
 230 
 231   MetaWord* expand_and_allocate(size_t size,
 232                                 MetadataType mdtype);
 233 
 234   bool contains(const void* ptr);
 235   void dump(outputStream* const out) const;
 236 
 237   // Free empty virtualspaces
 238   static void purge(MetadataType mdtype);
 239   static void purge();
 240 
 241   static void report_metadata_oome(ClassLoaderData* loader_data, size_t word_size,
 242                                    MetadataType mdtype, TRAPS);
 243 


 244   void print_on(outputStream* st) const;
 245   // Debugging support
 246   void verify();
 247 
 248   class AllocRecordClosure :  public StackObj {
 249   public:
 250     virtual void doit(address ptr, MetaspaceObj::Type type, int byte_size) = 0;
 251   };
 252 
 253   void iterate(AllocRecordClosure *closure);
 254 
 255   // Return TRUE only if UseCompressedClassPointers is True and DumpSharedSpaces is False.
 256   static bool using_class_space() {
 257     return NOT_LP64(false) LP64_ONLY(UseCompressedClassPointers && !DumpSharedSpaces);
 258   }
 259 
 260   static bool is_class_space_allocation(MetadataType mdType) {
 261     return mdType == ClassType && using_class_space();
 262   }
 263 




 224   size_t used_bytes_slow(MetadataType mdtype) const;
 225   size_t capacity_bytes_slow(MetadataType mdtype) const;
 226 
 227   static MetaWord* allocate(ClassLoaderData* loader_data, size_t word_size,
 228                             bool read_only, MetaspaceObj::Type type, TRAPS);
 229   void deallocate(MetaWord* ptr, size_t byte_size, bool is_class);
 230 
 231   MetaWord* expand_and_allocate(size_t size,
 232                                 MetadataType mdtype);
 233 
 234   bool contains(const void* ptr);
 235   void dump(outputStream* const out) const;
 236 
 237   // Free empty virtualspaces
 238   static void purge(MetadataType mdtype);
 239   static void purge();
 240 
 241   static void report_metadata_oome(ClassLoaderData* loader_data, size_t word_size,
 242                                    MetadataType mdtype, TRAPS);
 243 
 244   static const char* metadata_type_name(Metaspace::MetadataType mdtype);
 245 
 246   void print_on(outputStream* st) const;
 247   // Debugging support
 248   void verify();
 249 
 250   class AllocRecordClosure :  public StackObj {
 251   public:
 252     virtual void doit(address ptr, MetaspaceObj::Type type, int byte_size) = 0;
 253   };
 254 
 255   void iterate(AllocRecordClosure *closure);
 256 
 257   // Return TRUE only if UseCompressedClassPointers is True and DumpSharedSpaces is False.
 258   static bool using_class_space() {
 259     return NOT_LP64(false) LP64_ONLY(UseCompressedClassPointers && !DumpSharedSpaces);
 260   }
 261 
 262   static bool is_class_space_allocation(MetadataType mdType) {
 263     return mdType == ClassType && using_class_space();
 264   }
 265