RFR: 8272113: Build compare script fails with differences in classlist
Ioi Lam
iklam at openjdk.java.net
Sat Aug 7 07:30:37 UTC 2021
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`
-------------
Commit messages:
- 8272113: Build compare script fails with differences in classlist
Changes: https://git.openjdk.java.net/jdk/pull/5041/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5041&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8272113
Stats: 8 lines in 1 file changed: 6 ins; 0 del; 2 mod
Patch: https://git.openjdk.java.net/jdk/pull/5041.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/5041/head:pull/5041
PR: https://git.openjdk.java.net/jdk/pull/5041
More information about the build-dev
mailing list