RFR: 8328106: COMPARE_BUILD improvements

Magnus Ihse Bursie ihse at openjdk.org
Wed Mar 13 15:52:24 UTC 2024


This is a collection of various improvements to `COMPARE_BUILD` I have been using lately.

* Introducing `DEBUG_CDS_ARCHIVE` make variable, which is set automatically when using `COMPARE_BUILD`. This will create a detailed log file for the `classes*.jsa` CDS archives creation, to help debug any differences in these files. It is also possible to call `make DEBUG_CDS_ARCHIVE=true` to get this functionality even without running comparisons.

* `otool` on macOS did not include all relevant information.

* We now create modern "unified" diffs using `diff -u` whenever the output is supposed to be seen by the user. For diffs that are processed by the tooling, the traditional style `>`/`<` diffs are still used.

* "Other" files are now getting symlinks as well, to facilitate debugging; and also the diff output is improved.

* Better handling of showing diffs: 

  The `-vv` argument was too verbose. To see diffs, you also were required to see redundant information about unchanged files, which spammed the log.  Now instead you can set `--diffs` to see the diffs but not unchanged files. By default, this is cut after 500 lines, but using `--diffs=full` you can get the whole diffs. Beware that this can cause logs the size of hundereds of MB!

  Now `-vv` is aliased to `-v --diffs`, and `COMPARE_BUILD` is run with `--diffs` instead of `-vv` as default.

* And finally, for some reason (merge error?) the file `compare_exceptions.sh.incl` were not properly removed before, just replaced with an emty file. This is now fixed.

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

Commit messages:
 - 8328106: COMPARE_BUILD improvements

Changes: https://git.openjdk.org/jdk/pull/18279/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18279&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8328106
  Stats: 68 lines in 5 files changed: 39 ins; 0 del; 29 mod
  Patch: https://git.openjdk.org/jdk/pull/18279.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18279/head:pull/18279

PR: https://git.openjdk.org/jdk/pull/18279


More information about the build-dev mailing list