-
Bug
-
Resolution: Unresolved
-
P3
-
repo-leyden
https://github.com/openjdk/leyden/blob/09af3d438237b9fe80b1b7b5fe3327fb1e696643/src/hotspot/share/classfile/systemDictionaryShared.cpp#L296-L304
if (is_jfr_event_class(k)) {
// We cannot include JFR event classes because they need runtime-specific
// instrumentation in order to work with -XX:FlightRecorderOptions:retransform=false.
// There are only a small number of these classes, so it's not worthwhile to
// support them and make CDS more complicated.
if (!CDSConfig::is_dumping_reflection_data()) { // FIXME: !!! HACK !!!
return warn_excluded(k, "JFR event class");
}
}
Currently, java.lang.Class::reflectionData can reference a Java mirror of an excluded class. This will cause AOT assembly phase to fail.
The above HACK is to partially work around this problem by excluding fewer classes. However, it still doesn't work because other types of classes can be excluded (e.g., signed classes or unverifiable classes).
A proper fix is to pre-scan the signature of all the fields/methods/constructors, and avoid AOT-generation of reflectionData if any of the signatures refer to an excluded class.
if (is_jfr_event_class(k)) {
// We cannot include JFR event classes because they need runtime-specific
// instrumentation in order to work with -XX:FlightRecorderOptions:retransform=false.
// There are only a small number of these classes, so it's not worthwhile to
// support them and make CDS more complicated.
if (!CDSConfig::is_dumping_reflection_data()) { // FIXME: !!! HACK !!!
return warn_excluded(k, "JFR event class");
}
}
Currently, java.lang.Class::reflectionData can reference a Java mirror of an excluded class. This will cause AOT assembly phase to fail.
The above HACK is to partially work around this problem by excluding fewer classes. However, it still doesn't work because other types of classes can be excluded (e.g., signed classes or unverifiable classes).
A proper fix is to pre-scan the signature of all the fields/methods/constructors, and avoid AOT-generation of reflectionData if any of the signatures refer to an excluded class.
- relates to
-
JDK-8365718 [leyden] cds/appcds/aotCache/ExcludedClasses.java failed
-
- Resolved
-