RFR: 8272113: Build compare script fails with differences in classlist
Ioi Lam
iklam at openjdk.java.net
Mon Aug 9 15:53:36 UTC 2021
On Mon, 9 Aug 2021 08:14:44 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> The CDS classlist is generated with the `-XX:DumpLoadedClassList` option, which writes the name of the classes as they are being loaded. Since class loading order is affected by thread switching, the classes may appear in a non-deterministic order.
>>
>> Previously, the build compare script would sort the classlist before comparing. Since https://bugs.openjdk.java.net/browse/JDK-8272113, each class in the classlist has a new ID, so even after sorting, the contents would differ:
>>
>>
>> $ diff classlist.1 classlist.2
>> 207,208c207,208
>> < jdk/internal/misc/VM id: 201
>> < jdk/internal/util/SystemProps id: 202
>> ---
>>> jdk/internal/misc/VM id: 202
>>> jdk/internal/util/SystemProps id: 201
>>
>>
>> The fix is to strip the id before doing the file comparison.
>>
>> Tested with:
>>
>> `mach5 remote-build -b linux-aarch64-cmp-baseline,macosx-x64-cmp-baseline,linux-x64-cmp-baseline,linux-arm32-open-cmp-baseline,windows-x64-cmp-baseline`
>
> Lgtm.
Thanks @tschatzl and @hseigel for the review.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5041
More information about the build-dev
mailing list