RFR: 8317269: Store old classes in linked state in AOT cache [v2]

Coleen Phillimore coleenp at openjdk.org
Tue Aug 19 21:16:40 UTC 2025


On Thu, 14 Aug 2025 20:48:06 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> src/hotspot/share/cds/cdsConfig.cpp line 940:
>> 
>>> 938: 
>>> 939: bool CDSConfig::is_old_class_for_verifier(const InstanceKlass* ik) {
>>> 940:   return ik->major_version() < 50 /*JAVA_6_VERSION*/;
>> 
>> Java 6 classes may have methods with no stack maps, which falls back to old verification. Does InstanceKlass have info on whether each method used the old verifier or StackMapTable? Attribute detection alone does not work because SMT may be omitted if the control flow is trivial.
>
>> Does InstanceKlass have info on whether each method used the old verifier or StackMapTable?
> 
> The "fail over" verification happens on the entire class file. If a Java 6 class failed the new verification, it will be verified again with the old verifier.
> 
> Currently, such classes will be excluded from the AOT cache:
> 
> https://github.com/openjdk/jdk/blob/c5cbcac828e1c7aa845cf16e68f6306ae49e050c/src/hotspot/share/classfile/verifier.cpp#L231-L243
> 
> I will add a test case in this PR to make sure this case is covered. 
> 
> I also created a new RFE to include such classes in the AOT cache: https://bugs.openjdk.org/browse/JDK-8365575

I don't know why you don't fix these together, ie why does this differentiate < 50 classfiles or 50 that failed over to the old verifier?  Seems like is_old_class_for_verifier should be both.  You might have to set a status flag in the classfile for this though.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/26754#discussion_r2283145992


More information about the hotspot-dev mailing list