296 }
297
298 static void* aot_metaspace_base() { return _aot_metaspace_base; }
299 static void* aot_metaspace_top() { return _aot_metaspace_top; }
300
301 #define METASPACE_OBJ_TYPES_DO(f) \
302 f(Class) \
303 f(Symbol) \
304 f(TypeArrayU1) \
305 f(TypeArrayU2) \
306 f(TypeArrayU4) \
307 f(TypeArrayU8) \
308 f(TypeArrayOther) \
309 f(Method) \
310 f(ConstMethod) \
311 f(MethodData) \
312 f(ConstantPool) \
313 f(ConstantPoolCache) \
314 f(Annotations) \
315 f(MethodCounters) \
316 f(RecordComponent) \
317 f(KlassTrainingData) \
318 f(MethodTrainingData) \
319 f(CompileTrainingData) \
320 f(AdapterHandlerEntry) \
321 f(AdapterFingerPrint)
322
323 #define METASPACE_OBJ_TYPE_DECLARE(name) name ## Type,
324 #define METASPACE_OBJ_TYPE_NAME_CASE(name) case name ## Type: return #name;
325
326 enum Type {
327 // Types are MetaspaceObj::ClassType, MetaspaceObj::SymbolType, etc
328 METASPACE_OBJ_TYPES_DO(METASPACE_OBJ_TYPE_DECLARE)
329 _number_of_types
330 };
331
332 static const char * type_name(Type type) {
333 switch(type) {
334 METASPACE_OBJ_TYPES_DO(METASPACE_OBJ_TYPE_NAME_CASE)
335 default:
|
296 }
297
298 static void* aot_metaspace_base() { return _aot_metaspace_base; }
299 static void* aot_metaspace_top() { return _aot_metaspace_top; }
300
301 #define METASPACE_OBJ_TYPES_DO(f) \
302 f(Class) \
303 f(Symbol) \
304 f(TypeArrayU1) \
305 f(TypeArrayU2) \
306 f(TypeArrayU4) \
307 f(TypeArrayU8) \
308 f(TypeArrayOther) \
309 f(Method) \
310 f(ConstMethod) \
311 f(MethodData) \
312 f(ConstantPool) \
313 f(ConstantPoolCache) \
314 f(Annotations) \
315 f(MethodCounters) \
316 f(InlineLayoutInfo) \
317 f(RecordComponent) \
318 f(KlassTrainingData) \
319 f(MethodTrainingData) \
320 f(CompileTrainingData) \
321 f(AdapterHandlerEntry) \
322 f(AdapterFingerPrint)
323
324 #define METASPACE_OBJ_TYPE_DECLARE(name) name ## Type,
325 #define METASPACE_OBJ_TYPE_NAME_CASE(name) case name ## Type: return #name;
326
327 enum Type {
328 // Types are MetaspaceObj::ClassType, MetaspaceObj::SymbolType, etc
329 METASPACE_OBJ_TYPES_DO(METASPACE_OBJ_TYPE_DECLARE)
330 _number_of_types
331 };
332
333 static const char * type_name(Type type) {
334 switch(type) {
335 METASPACE_OBJ_TYPES_DO(METASPACE_OBJ_TYPE_NAME_CASE)
336 default:
|