mbox

[0/3] Improve determinism of ABI XML representation

Message ID 20200113150132.107693-1-maennich@google.com
Headers show

Message

Matthias Maennich via libabigail Jan. 1, 2020, midnight UTC
This patch series introduces means to improve the stability of the ABI XML
representation across multiple runs of abidw.

If binaries are compiled in different ways (different order of compilation
units) or collected in a different way (different order of corpora), they might
be 100% compatible and their XML representation of the ABI might be even
identical. Yet as the current representation determines the order by the input
order, textual differences across different runs might be significantly
different.

This series stabilizes the sorting order of corpora in corpus-groups (while
still maintaining the main corpus as first entry) and the sorting order of
translation units associated with said corpora.

I did not send this series (just this cover letter), as the patch series also
adjusts the test data accordingly and therefore the patches are rather big.
Patch 3/3 is 50M! I staged them in a separate branch (mm-writer-improvements),
along with the other related patches I sent today:

  reader context: do not reuse current corpus and corpus_group
  https://sourceware.org/git/gitweb.cgi?p=libabigail.git;a=commit;h=a94ce9248b8780c9ee63f8f80293857ed049d88a

  corpus/writer: sort emitted corpora by path name
  https://sourceware.org/git/gitweb.cgi?p=libabigail.git;a=commit;h=0319e715d9fa2fc46561cb915d16954cbab9cbd6

  corpus/writer: sort emitted translation units by path name
  https://sourceware.org/git/gitweb.cgi?p=libabigail.git;a=commit;h=3e26328c939ad635d9da49be4e8749c25635f70c

Cheers,
Matthias


Matthias Maennich (3):
  reader context: do not reuse current corpus and corpus_group
  corpus/writer: sort emitted corpora by path name
  corpus/writer: sort emitted translation units by path name

 include/abg-corpus.h                          |    13 +-
 include/abg-fwd.h                             |     2 -
 include/abg-ir.h                              |    15 +
 src/abg-corpus.cc                             |    21 +-
 src/abg-dwarf-reader.cc                       |    11 +-
 src/abg-reader.cc                             |    49 +-
 src/abg-writer.cc                             |    16 +-
 .../data/test-annotate/test13-pr18894.so.abi  |   562 +-
 .../data/test-annotate/test14-pr18893.so.abi  | 11708 +--
 .../data/test-annotate/test15-pr18892.so.abi  | 71712 +++++++--------
 .../data/test-annotate/test17-pr19027.so.abi  | 54448 +++++------
 ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi |    58 +-
 ...19-pr19023-libtcmalloc_and_profiler.so.abi | 76289 ++++++++--------
 ...st20-pr19025-libvtkParallelCore-6.1.so.abi |  9220 +-
 .../data/test-annotate/test21-pr19092.so.abi  | 12358 +--
 .../PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi |  1072 +-
 .../test-read-dwarf/test13-pr18894.so.abi     |   454 +-
 .../test-read-dwarf/test14-pr18893.so.abi     | 10274 +--
 .../test-read-dwarf/test15-pr18892.so.abi     | 38226 ++++----
 .../test-read-dwarf/test16-pr18904.so.abi     | 43794 ++++-----
 .../test-read-dwarf/test17-pr19027.so.abi     | 11108 +--
 ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi |    42 +-
 ...19-pr19023-libtcmalloc_and_profiler.so.abi | 37213 ++++----
 ...st20-pr19025-libvtkParallelCore-6.1.so.abi |  8540 +-
 .../test-read-dwarf/test21-pr19092.so.abi     |  7734 +-
 .../test22-pr19097-libstdc++.so.6.0.17.so.abi | 75710 +++++++--------
 26 files changed, 235655 insertions(+), 234994 deletions(-)