public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Improvements for the XML Writer
@ 2021-12-03 11:46 Matthias Maennich
  2021-12-03 11:46 ` [PATCH 1/5] XML writer: use consistent type pointers for type ids and emission tracking Matthias Maennich
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Matthias Maennich @ 2021-12-03 11:46 UTC (permalink / raw)
  To: libabigail; +Cc: dodji, gprocida, kernel-team, maennich

We gave the issues we currently see with some larger (Android) userspace
libraries another try. Initially that was bug 28320 (infinite loops in the XML
writer). More recently, another Google team expressed an interest in ABI
monitoring and using libabigail for this purpose. A significant issue they
encountered was that large ABIs took a very long time to be extracted by abidw.
It turns out that a lot of abidw time is spent on writing out the XML.

We have been unable to merge upstream libabigail due to this affecting
userspace library monitoring. Both issues involved deep type equality tests
done by the XML writer. This series switches the XML writer to use bare type
pointers in all its containers.

Fixes: Bug 28320 - abidw - (non-deterministic) infinite loop in XML writer
Improves: Bug 26591 - detect pathologically redundant types in abixml

Performance improvements, all measurements are in CPU user seconds:
 - abidw for both test suite and typical kernel inputs is about 2% faster with this change
 - An AOSP framework library test case is sped up by >3 times, from 120 to 37.5
 - An internal Google library test case is sped up >20 times, from 3290 to 160

Impact on test cases:

 - tests/data/test-read-dwarf/PR22122-libftdc.so.abi is the only
   significantly-impacted test case. abidiff reports no change, but
   abidiff --harmless shows some things going on with empty, anonymous struct
   definitions. These empty structs are due to missing DW_AT_signature support
   / are correlated with DW_AT_signature attributes. The object file was
   compiled with Clang. Some more details have recently been discussed in bug
   26591.

 - All the other test object files are reported as having the same ABI by
   abidiff --harmless.

 - Our own test suite of small changes also has no differences found by
   abidiff --harmless.

 - One test kernel tree has an issue with one anonymous enum type being
   resolved incorrectly (having previously had conflicting duplicate
   definitions). The enumerators all have the same values so there is no ABI
   risk here. This deserves further investigation but should probably not hold
   up the series.

 - Spot checks with userspace libraries show no differences found by
   abidiff --harmless either.

Matthias Maennich (5):
  XML writer: use consistent type pointers for type ids and emission
    tracking
  XML writer: use exemplar types for tracking referenced types
  XML writer: track emitted types by bare pointer
  XML writer: map type ids by bare pointer
  XML writer: resolve declaration-only enum definitions

 src/abg-writer.cc                             |   80 +-
 .../data/test-annotate/test14-pr18893.so.abi  |    2 -
 .../data/test-annotate/test15-pr18892.so.abi  |   44 +-
 ...19-pr19023-libtcmalloc_and_profiler.so.abi |    4 -
 .../data/test-annotate/test21-pr19092.so.abi  |   26 +-
 .../test-read-dwarf/PR22122-libftdc.so.abi    | 6242 ++++++++---------
 .../data/test-read-dwarf/PR25007-sdhci.ko.abi |  514 +-
 .../PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi |    2 +-
 .../test-read-dwarf/test14-pr18893.so.abi     |    1 -
 .../test-read-dwarf/test15-pr18892.so.abi     |   28 +-
 .../test-read-dwarf/test16-pr18904.so.abi     |    2 -
 ...19-pr19023-libtcmalloc_and_profiler.so.abi |    2 -
 .../test-read-dwarf/test21-pr19092.so.abi     |   16 +-
 .../test22-pr19097-libstdc++.so.6.0.17.so.abi |    1 -
 14 files changed, 3472 insertions(+), 3492 deletions(-)

-- 
2.34.1.400.ga245620fadb-goog


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-01-19 10:39 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-03 11:46 [PATCH 0/5] Improvements for the XML Writer Matthias Maennich
2021-12-03 11:46 ` [PATCH 1/5] XML writer: use consistent type pointers for type ids and emission tracking Matthias Maennich
2021-12-09 17:57   ` Dodji Seketeli
2021-12-03 11:46 ` [PATCH 2/5] XML writer: use exemplar types for tracking referenced types Matthias Maennich
2021-12-10 10:42   ` Dodji Seketeli
2021-12-03 11:46 ` [PATCH 3/5] XML writer: track emitted types by bare pointer Matthias Maennich
2021-12-10 10:50   ` Dodji Seketeli
2021-12-16 16:07     ` Matthias Maennich
2022-01-10 17:00       ` Dodji Seketeli
2022-01-17 18:03         ` Matthias Maennich
2022-01-18 17:15   ` Dodji Seketeli
2021-12-03 11:46 ` [PATCH 4/5] XML writer: map type ids " Matthias Maennich
2022-01-19 10:12   ` Dodji Seketeli
2021-12-03 11:46 ` [PATCH 5/5] XML writer: resolve declaration-only enum definitions Matthias Maennich
2022-01-19 10:38   ` Dodji Seketeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).