-Xlog:cds+map+oop=trace produces logs like this:
0x00000000ffe7af28: @@ Object (0xffe7af28) java.lang.Class
0x00000000ffe7af28: 40b7b001 0000035b 001bb638 00000000 001a9b90 00000008 00000000 00000000 ...@[...8.......................
0x00000000ffe7af48: 00000013 0000000a 00000000 00000000 00000000 00000000 00000000 00000000 ................................
0x00000000ffe7af68: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................
0x00000000ffe7af88: 00000000 00000000 00000000 fff04c58 00000000 00000000 00000000 00000000 ............XL..................
0x00000000ffe7afa8: 00000000 00000000 00000000 00000000 00000000 00000000 ........................
- klass: 'java/lang/Class' 0x00000008001bb638
- fields (19 words):
- private volatile transient 'classRedefinedCount' 'I' @12 0 (0x00000000)
- injected 'klass' 'J' @16 0x00000008001a9b90 (marked metadata pointer @0x00000000ffe7af38 )
- injected 'array_klass' 'J' @24 0 (0x0000000000000000)
- injected 'oop_size' 'I' @32 19 (0x00000013)
- injected 'static_oop_field_count' 'I' @36 10 (0x0000000a)
- private volatile transient 'cachedConstructor' 'Ljava/lang/reflect/Constructor;' @40 null
- private transient 'name' 'Ljava/lang/String;' @44 null
- private transient 'module' 'Ljava/lang/Module;' @48 null
- private final 'classLoader' 'Ljava/lang/ClassLoader;' @52 null
- private transient 'classData' 'Ljava/lang/Object;' @56 null
- private transient 'signers' '[Ljava/lang/Object;' @60 null
- private transient 'packageName' 'Ljava/lang/String;' @64 null
- private final 'componentType' 'Ljava/lang/Class;' @68 null
- private volatile transient 'reflectionData' 'Ljava/lang/ref/SoftReference;' @72 null
- private volatile transient 'genericInfo' 'Lsun/reflect/generics/repository/ClassRepository;' @76 null
- private volatile transient 'enumConstants' '[Ljava/lang/Object;' @80 null
- private volatile transient 'enumConstantDirectory' 'Ljava/util/Map;' @84 null
- private volatile transient 'annotationData' 'Ljava/lang/Class$AnnotationData;' @88 null
- private volatile transient 'annotationType' 'Lsun/reflect/annotation/AnnotationType;' @92 null
- transient 'classValueMap' 'Ljava/lang/ClassValue$ClassValueMap;' @96 null
- injected 'protection_domain' 'Ljava/lang/Object;' @100 null
- injected 'source_file' 'Ljava/lang/Object;' @104 null
- injected '<init_lock>' 'Ljava/lang/Object;' @108 0x00000000fff04c58 (0xfff04c58) [I length: 0
Problems are:
[1] The name of this class is not printed
[2] The values of the static fields are not printed
[3] It's difficult to find the resolved_reference_array for this class
=====================================
Sample output after this RFE
0x00000000ffe7af28: @@ Object (0xffe7af28) java.lang.Class Ljava/lang/System;
0x00000000ffe7af28: 40b7b001 0000035b 001bb638 00000000 001a9b90 00000008 00000000 00000000 ...@[...8.......................
0x00000000ffe7af48: 00000013 0000000a 00000000 00000000 00000000 00000000 00000000 00000000 ................................
0x00000000ffe7af68: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................
0x00000000ffe7af88: 00000000 00000000 00000000 fff04c58 00000000 00000000 00000000 00000000 ............XL..................
0x00000000ffe7afa8: 00000000 00000000 00000000 00000000 00000000 00000000 ........................
- klass: 'java/lang/Class' 0x00000008001bb638
- fields (19 words):
- private volatile transient 'classRedefinedCount' 'I' @12 0 (0x00000000)
- injected 'klass' 'J' @16 0x00000008001a9b90 (marked metadata pointer @0x00000000ffe7af38 )
- injected 'array_klass' 'J' @24 0 (0x0000000000000000)
- injected 'oop_size' 'I' @32 19 (0x00000013)
- injected 'static_oop_field_count' 'I' @36 10 (0x0000000a)
- private volatile transient 'cachedConstructor' 'Ljava/lang/reflect/Constructor;' @40 null
- private transient 'name' 'Ljava/lang/String;' @44 null
- private transient 'module' 'Ljava/lang/Module;' @48 null
- private final 'classLoader' 'Ljava/lang/ClassLoader;' @52 null
- private transient 'classData' 'Ljava/lang/Object;' @56 null
- private transient 'signers' '[Ljava/lang/Object;' @60 null
- private transient 'packageName' 'Ljava/lang/String;' @64 null
- private final 'componentType' 'Ljava/lang/Class;' @68 null
- private volatile transient 'reflectionData' 'Ljava/lang/ref/SoftReference;' @72 null
- private volatile transient 'genericInfo' 'Lsun/reflect/generics/repository/ClassRepository;' @76 null
- private volatile transient 'enumConstants' '[Ljava/lang/Object;' @80 null
- private volatile transient 'enumConstantDirectory' 'Ljava/util/Map;' @84 null
- private volatile transient 'annotationData' 'Ljava/lang/Class$AnnotationData;' @88 null
- private volatile transient 'annotationType' 'Lsun/reflect/annotation/AnnotationType;' @92 null
- transient 'classValueMap' 'Ljava/lang/ClassValue$ClassValueMap;' @96 null
- injected 'protection_domain' 'Ljava/lang/Object;' @100 null
- injected 'source_file' 'Ljava/lang/Object;' @104 null
- injected '<init_lock>' 'Ljava/lang/Object;' @108 0x00000000fff04c58 (0xfff04c58) [I length: 0
- signature: Ljava/lang/System;
- archived_resolved_references: 0x00000000ffe31b18 (0xffe31b18) [Ljava.lang.Object; length: 29
- ---- static fields (10):
- public static final 'in' 'Ljava/io/InputStream;' @112 null
- public static final 'out' 'Ljava/io/PrintStream;' @116 null
- public static final 'err' 'Ljava/io/PrintStream;' @120 null
- private static 'initialIn' 'Ljava/io/InputStream;' @124 null
- private static 'initialErr' 'Ljava/io/PrintStream;' @128 null
- private static 'notSupportedJnuEncoding' 'Ljava/lang/String;' @132 null
- private static volatile 'cons' 'Ljava/io/Console;' @136 null
- private static 'props' 'Ljava/util/Properties;' @140 null
- private static 'lineSeparator' 'Ljava/lang/String;' @144 null
- static 'bootLayer' 'Ljava/lang/ModuleLayer;' @148 null
0x00000000ffe7af28: @@ Object (0xffe7af28) java.lang.Class
0x00000000ffe7af28: 40b7b001 0000035b 001bb638 00000000 001a9b90 00000008 00000000 00000000 ...@[...8.......................
0x00000000ffe7af48: 00000013 0000000a 00000000 00000000 00000000 00000000 00000000 00000000 ................................
0x00000000ffe7af68: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................
0x00000000ffe7af88: 00000000 00000000 00000000 fff04c58 00000000 00000000 00000000 00000000 ............XL..................
0x00000000ffe7afa8: 00000000 00000000 00000000 00000000 00000000 00000000 ........................
- klass: 'java/lang/Class' 0x00000008001bb638
- fields (19 words):
- private volatile transient 'classRedefinedCount' 'I' @12 0 (0x00000000)
- injected 'klass' 'J' @16 0x00000008001a9b90 (marked metadata pointer @0x00000000ffe7af38 )
- injected 'array_klass' 'J' @24 0 (0x0000000000000000)
- injected 'oop_size' 'I' @32 19 (0x00000013)
- injected 'static_oop_field_count' 'I' @36 10 (0x0000000a)
- private volatile transient 'cachedConstructor' 'Ljava/lang/reflect/Constructor;' @40 null
- private transient 'name' 'Ljava/lang/String;' @44 null
- private transient 'module' 'Ljava/lang/Module;' @48 null
- private final 'classLoader' 'Ljava/lang/ClassLoader;' @52 null
- private transient 'classData' 'Ljava/lang/Object;' @56 null
- private transient 'signers' '[Ljava/lang/Object;' @60 null
- private transient 'packageName' 'Ljava/lang/String;' @64 null
- private final 'componentType' 'Ljava/lang/Class;' @68 null
- private volatile transient 'reflectionData' 'Ljava/lang/ref/SoftReference;' @72 null
- private volatile transient 'genericInfo' 'Lsun/reflect/generics/repository/ClassRepository;' @76 null
- private volatile transient 'enumConstants' '[Ljava/lang/Object;' @80 null
- private volatile transient 'enumConstantDirectory' 'Ljava/util/Map;' @84 null
- private volatile transient 'annotationData' 'Ljava/lang/Class$AnnotationData;' @88 null
- private volatile transient 'annotationType' 'Lsun/reflect/annotation/AnnotationType;' @92 null
- transient 'classValueMap' 'Ljava/lang/ClassValue$ClassValueMap;' @96 null
- injected 'protection_domain' 'Ljava/lang/Object;' @100 null
- injected 'source_file' 'Ljava/lang/Object;' @104 null
- injected '<init_lock>' 'Ljava/lang/Object;' @108 0x00000000fff04c58 (0xfff04c58) [I length: 0
Problems are:
[1] The name of this class is not printed
[2] The values of the static fields are not printed
[3] It's difficult to find the resolved_reference_array for this class
=====================================
Sample output after this RFE
0x00000000ffe7af28: @@ Object (0xffe7af28) java.lang.Class Ljava/lang/System;
0x00000000ffe7af28: 40b7b001 0000035b 001bb638 00000000 001a9b90 00000008 00000000 00000000 ...@[...8.......................
0x00000000ffe7af48: 00000013 0000000a 00000000 00000000 00000000 00000000 00000000 00000000 ................................
0x00000000ffe7af68: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................
0x00000000ffe7af88: 00000000 00000000 00000000 fff04c58 00000000 00000000 00000000 00000000 ............XL..................
0x00000000ffe7afa8: 00000000 00000000 00000000 00000000 00000000 00000000 ........................
- klass: 'java/lang/Class' 0x00000008001bb638
- fields (19 words):
- private volatile transient 'classRedefinedCount' 'I' @12 0 (0x00000000)
- injected 'klass' 'J' @16 0x00000008001a9b90 (marked metadata pointer @0x00000000ffe7af38 )
- injected 'array_klass' 'J' @24 0 (0x0000000000000000)
- injected 'oop_size' 'I' @32 19 (0x00000013)
- injected 'static_oop_field_count' 'I' @36 10 (0x0000000a)
- private volatile transient 'cachedConstructor' 'Ljava/lang/reflect/Constructor;' @40 null
- private transient 'name' 'Ljava/lang/String;' @44 null
- private transient 'module' 'Ljava/lang/Module;' @48 null
- private final 'classLoader' 'Ljava/lang/ClassLoader;' @52 null
- private transient 'classData' 'Ljava/lang/Object;' @56 null
- private transient 'signers' '[Ljava/lang/Object;' @60 null
- private transient 'packageName' 'Ljava/lang/String;' @64 null
- private final 'componentType' 'Ljava/lang/Class;' @68 null
- private volatile transient 'reflectionData' 'Ljava/lang/ref/SoftReference;' @72 null
- private volatile transient 'genericInfo' 'Lsun/reflect/generics/repository/ClassRepository;' @76 null
- private volatile transient 'enumConstants' '[Ljava/lang/Object;' @80 null
- private volatile transient 'enumConstantDirectory' 'Ljava/util/Map;' @84 null
- private volatile transient 'annotationData' 'Ljava/lang/Class$AnnotationData;' @88 null
- private volatile transient 'annotationType' 'Lsun/reflect/annotation/AnnotationType;' @92 null
- transient 'classValueMap' 'Ljava/lang/ClassValue$ClassValueMap;' @96 null
- injected 'protection_domain' 'Ljava/lang/Object;' @100 null
- injected 'source_file' 'Ljava/lang/Object;' @104 null
- injected '<init_lock>' 'Ljava/lang/Object;' @108 0x00000000fff04c58 (0xfff04c58) [I length: 0
- signature: Ljava/lang/System;
- archived_resolved_references: 0x00000000ffe31b18 (0xffe31b18) [Ljava.lang.Object; length: 29
- ---- static fields (10):
- public static final 'in' 'Ljava/io/InputStream;' @112 null
- public static final 'out' 'Ljava/io/PrintStream;' @116 null
- public static final 'err' 'Ljava/io/PrintStream;' @120 null
- private static 'initialIn' 'Ljava/io/InputStream;' @124 null
- private static 'initialErr' 'Ljava/io/PrintStream;' @128 null
- private static 'notSupportedJnuEncoding' 'Ljava/lang/String;' @132 null
- private static volatile 'cons' 'Ljava/io/Console;' @136 null
- private static 'props' 'Ljava/util/Properties;' @140 null
- private static 'lineSeparator' 'Ljava/lang/String;' @144 null
- static 'bootLayer' 'Ljava/lang/ModuleLayer;' @148 null
- links to
-
Commit(master) openjdk/jdk/f51363e0
-
Review(master) openjdk/jdk/22345