mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-18 16:04:34 +00:00
0af65e6364
abidiff libjvm.so libjvm.so is taking forever in the master branch these days. At some point it was taking ~ 15 minutes and 15GB of RAM on a non-optimized build. Profiling of CPU usage showed that sorting virtual member functions of a class whenever a new virtual member function is added was the hot spot. This patch now sorts virtual member functions once right after the type was canonicalized. The patch adds a virtual function type_base::on_canonical_type_set() that is invoked right after the canonical type is set for a given type. class_decl gets its own version of that virtual function: class_decl::on_canonical_type_set. In that function, the patch does sort the virtual member functions of the current class_decl. Now with this patch, abidiff is still taking around 15 minutes but it consumes less than 12GB of ram. This means the memory consumption was reduced by 20%. abipkgdiff performs on 16:30 minutes and in less than 12GB of RAM as well. All these times are measured on a non-optimized build. * include/abg-ir.h ({type_base, class_decl}::on_canonical_type_set): Declare new virtual member function. * src/abg-ir.cc (type_base::on_canonical_type_set): Define new virtual member function that does nothing. (class_decl::on_canonical_type_set): Define new virtual member function that sorts the virtual member functions of class_decl. (canonicalize): Invoke type_base::on_canonical_type_set when the canonical type is set. (fixup_virtual_member_function): Don't sort virtual member functions here. * src/abg-dwarf-reader.cc (finish_member_function_reading): Do not sort virtual member functions here. * tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust. * tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust. * tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust. * tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust. * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
abg-comp-filter.h | ||
abg-comparison.h | ||
abg-config.h | ||
abg-corpus.h | ||
abg-diff-utils.h | ||
abg-dwarf-reader.h | ||
abg-fwd.h | ||
abg-hash.h | ||
abg-ini.h | ||
abg-interned-str.h | ||
abg-ir.h | ||
abg-libxml-utils.h | ||
abg-libzip-utils.h | ||
abg-reader.h | ||
abg-sptr-utils.h | ||
abg-suppression.h | ||
abg-tools-utils.h | ||
abg-traverse.h | ||
abg-version.h.in | ||
abg-viz-common.h | ||
abg-viz-dot.h | ||
abg-viz-svg.h | ||
abg-workers.h | ||
abg-writer.h | ||
Makefile.am |