248 public:
249 bool is_metaspace_object() const;
250 bool is_shared() const;
251 void print_address_on(outputStream* st) const; // nonvirtual address printing
252
253 #define METASPACE_OBJ_TYPES_DO(f) \
254 f(Unknown) \
255 f(Class) \
256 f(Symbol) \
257 f(TypeArrayU1) \
258 f(TypeArrayU2) \
259 f(TypeArrayU4) \
260 f(TypeArrayU8) \
261 f(TypeArrayOther) \
262 f(Method) \
263 f(ConstMethod) \
264 f(MethodData) \
265 f(ConstantPool) \
266 f(ConstantPoolCache) \
267 f(Annotation) \
268 f(MethodCounters)
269
270 #define METASPACE_OBJ_TYPE_DECLARE(name) name ## Type,
271 #define METASPACE_OBJ_TYPE_NAME_CASE(name) case name ## Type: return #name;
272
273 enum Type {
274 // Types are MetaspaceObj::ClassType, MetaspaceObj::SymbolType, etc
275 METASPACE_OBJ_TYPES_DO(METASPACE_OBJ_TYPE_DECLARE)
276 _number_of_types
277 };
278
279 static const char * type_name(Type type) {
280 switch(type) {
281 METASPACE_OBJ_TYPES_DO(METASPACE_OBJ_TYPE_NAME_CASE)
282 default:
283 ShouldNotReachHere();
284 return NULL;
285 }
286 }
287
288 static MetaspaceObj::Type array_type(size_t elem_size) {
|
248 public:
249 bool is_metaspace_object() const;
250 bool is_shared() const;
251 void print_address_on(outputStream* st) const; // nonvirtual address printing
252
253 #define METASPACE_OBJ_TYPES_DO(f) \
254 f(Unknown) \
255 f(Class) \
256 f(Symbol) \
257 f(TypeArrayU1) \
258 f(TypeArrayU2) \
259 f(TypeArrayU4) \
260 f(TypeArrayU8) \
261 f(TypeArrayOther) \
262 f(Method) \
263 f(ConstMethod) \
264 f(MethodData) \
265 f(ConstantPool) \
266 f(ConstantPoolCache) \
267 f(Annotation) \
268 f(MethodCounters) \
269 f(Deallocated)
270
271 #define METASPACE_OBJ_TYPE_DECLARE(name) name ## Type,
272 #define METASPACE_OBJ_TYPE_NAME_CASE(name) case name ## Type: return #name;
273
274 enum Type {
275 // Types are MetaspaceObj::ClassType, MetaspaceObj::SymbolType, etc
276 METASPACE_OBJ_TYPES_DO(METASPACE_OBJ_TYPE_DECLARE)
277 _number_of_types
278 };
279
280 static const char * type_name(Type type) {
281 switch(type) {
282 METASPACE_OBJ_TYPES_DO(METASPACE_OBJ_TYPE_NAME_CASE)
283 default:
284 ShouldNotReachHere();
285 return NULL;
286 }
287 }
288
289 static MetaspaceObj::Type array_type(size_t elem_size) {
|