RFR: 8275084: CDS warning during incremental build [v2]

David Holmes dholmes at openjdk.java.net
Tue Oct 19 02:19:49 UTC 2021


On Mon, 18 Oct 2021 22:35:16 GMT, Yumin Qi <minqi at openjdk.org> wrote:

>> Hi, Please review
>>   The generated SPECIES functions archived during dumping CDS archive. But some time rebuild issue warning 
>>   [2.325s][warning][cds] java.lang.ClassNotFoundException: java.lang.invoke.BoundMethodHandle$Species_LLLLL
>>   Since we only care archiving functions generated in the four holder classes:
>>   java.lang.invoke.Invokers$Holder, java.lang.invoke.LambdaForm$Holder, java.lang.invoke.DirectMethodHandle$Holder and java.lang.invoke.DelegatingMethodHandle$Holder
>>   This patch removed the logging thus the archiving of SPECIES_RESOLVED functions in shared archive.
>> 
>> Tests: tier1,tier4
>> 
>> Thanks
>> Yumin
>
> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Comment should not be changed

> This patch removed the logging thus the archiving of SPECIES_RESOLVED functions in shared archive.

I find it surprising that "logging" has a direct affect on archiving!

Overall it is not at all clear where the actual warnings were arising from, given that if you follow this "logging" code then these species classes should have been filtered out anyway:


static const char* filter[NUM_FILTER] = {"java.lang.invoke.Invokers$Holder",
                                         "java.lang.invoke.DirectMethodHandle$Holder",
                                         "java.lang.invoke.DelegatingMethodHandle$Holder",
                                         "java.lang.invoke.LambdaForm$Holder"};

static bool should_be_archived(char* line) {
  for (int k = 0; k < NUM_FILTER; k++) {
    if (strstr(line, filter[k]) != nullptr) {
      return true;
    }
  }
  return false;
}

src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java line 143:

> 141:         }
> 142:         if (CDS.isDumpingClassList()) {
> 143:             CDS.traceSpeciesType("[SPECIES_RESOLVE]", cn);

This CDS function seems to be unused now.

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

PR: https://git.openjdk.java.net/jdk/pull/5998


More information about the hotspot-runtime-dev mailing list