298
299 static void* shared_metaspace_base() { return _shared_metaspace_base; }
300 static void* shared_metaspace_top() { return _shared_metaspace_top; }
301
302 #define METASPACE_OBJ_TYPES_DO(f) \
303 f(Class) \
304 f(Symbol) \
305 f(TypeArrayU1) \
306 f(TypeArrayU2) \
307 f(TypeArrayU4) \
308 f(TypeArrayU8) \
309 f(TypeArrayOther) \
310 f(Method) \
311 f(ConstMethod) \
312 f(MethodData) \
313 f(ConstantPool) \
314 f(ConstantPoolCache) \
315 f(Annotations) \
316 f(MethodCounters) \
317 f(SharedClassPathEntry) \
318 f(RecordComponent)
319
320 #define METASPACE_OBJ_TYPE_DECLARE(name) name ## Type,
321 #define METASPACE_OBJ_TYPE_NAME_CASE(name) case name ## Type: return #name;
322
323 enum Type {
324 // Types are MetaspaceObj::ClassType, MetaspaceObj::SymbolType, etc
325 METASPACE_OBJ_TYPES_DO(METASPACE_OBJ_TYPE_DECLARE)
326 _number_of_types
327 };
328
329 static const char * type_name(Type type) {
330 switch(type) {
331 METASPACE_OBJ_TYPES_DO(METASPACE_OBJ_TYPE_NAME_CASE)
332 default:
333 ShouldNotReachHere();
334 return nullptr;
335 }
336 }
337
338 static MetaspaceObj::Type array_type(size_t elem_size) {
|
298
299 static void* shared_metaspace_base() { return _shared_metaspace_base; }
300 static void* shared_metaspace_top() { return _shared_metaspace_top; }
301
302 #define METASPACE_OBJ_TYPES_DO(f) \
303 f(Class) \
304 f(Symbol) \
305 f(TypeArrayU1) \
306 f(TypeArrayU2) \
307 f(TypeArrayU4) \
308 f(TypeArrayU8) \
309 f(TypeArrayOther) \
310 f(Method) \
311 f(ConstMethod) \
312 f(MethodData) \
313 f(ConstantPool) \
314 f(ConstantPoolCache) \
315 f(Annotations) \
316 f(MethodCounters) \
317 f(SharedClassPathEntry) \
318 f(RecordComponent) \
319 f(InlineLayoutInfo)
320
321 #define METASPACE_OBJ_TYPE_DECLARE(name) name ## Type,
322 #define METASPACE_OBJ_TYPE_NAME_CASE(name) case name ## Type: return #name;
323
324 enum Type {
325 // Types are MetaspaceObj::ClassType, MetaspaceObj::SymbolType, etc
326 METASPACE_OBJ_TYPES_DO(METASPACE_OBJ_TYPE_DECLARE)
327 _number_of_types
328 };
329
330 static const char * type_name(Type type) {
331 switch(type) {
332 METASPACE_OBJ_TYPES_DO(METASPACE_OBJ_TYPE_NAME_CASE)
333 default:
334 ShouldNotReachHere();
335 return nullptr;
336 }
337 }
338
339 static MetaspaceObj::Type array_type(size_t elem_size) {
|