C1 and C2 have intrinsics to get the field Klass::_modifier_flags for performance of Class.getModifiers() native method. Hotspot doesn't use or care about this field other than setting it once. The field could be moved to java.lang.Class and initialized once in Hotspot's create_mirror() and accessed as a getfield in Java code without needing intrinsics to recognize this call.
I'm putting this on the compiler subcomponent but have a patch so far.
- causes
-
JDK-8350649 Class unloading accesses/resurrects dead Java mirror after JDK-8346567
-
- Resolved
-
- relates to
-
JDK-8347145 C2: Track klass type information for Java class mirrors
-
- Open
-
-
JDK-8349860 Make Class.isArray(), Class.isInterface() and Class.isPrimitive() non-native
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/c9cadbd2
-
Review(master) openjdk/jdk/22652