Integrated: 8272113: Build compare script fails with differences in classlist

Ioi Lam iklam at openjdk.java.net
Mon Aug 9 15:53:37 UTC 2021


On Sat, 7 Aug 2021 07:25:01 GMT, Ioi Lam <iklam 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`

This pull request has now been integrated.

Changeset: 272fcb42
Author:    Ioi Lam <iklam at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/272fcb423a79b5b8bb4a80679b6b48feca66ebca
Stats:     8 lines in 1 file changed: 6 ins; 0 del; 2 mod

8272113: Build compare script fails with differences in classlist

Reviewed-by: tschatzl, hseigel

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

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



More information about the build-dev mailing list