mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-17 15:34:34 +00:00
The Git repository of the Libabigail Project
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> |
||
---|---|---|
autoconf-archive | ||
bash-completion | ||
doc | ||
include | ||
m4 | ||
scripts | ||
src | ||
tests | ||
tools | ||
.gitignore | ||
abigail.m4 | ||
AUTHORS | ||
ChangeLog | ||
COMMIT-LOG-GUIDELINES | ||
COMPILING | ||
configure.ac | ||
CONTRIBUTING | ||
COPYING | ||
COPYING-GPLV3 | ||
COPYING-LGPLV2 | ||
COPYING-LGPLV3 | ||
default.abignore | ||
gen-changelog.py | ||
install-sh | ||
libabigail.pc.in | ||
ltmain.sh | ||
Makefile.am | ||
NEWS | ||
README | ||
release-text-template.txt | ||
VISIBILITY |
This is the Application Binary Interface Generic Analysis and Instrumentation Library. It aims at constructing, manipulating, serializing and de-serializing ABI-relevant artifacts. The set of artifacts that we are intersted is made of quantities like types, variable, fonctions and declarations of a given library or program. For a given library or program this set of quantities is called an ABI corpus. This library aims at (among other things) providing a way to compare two ABI Corpora (apparently the plural of corpus is copora, heh, that's cool), provide detailed information about their differences, and help build tools to infer interesting conclusions about these differences. You are welcome to contribute to this project after reading the files CONTRIBUTING and COMMIT-LOG-GUIDELINES files in the source tree. Communicating with the maintainers of this project -- including sending patches to be include to the source code -- happens via email at libabigail@sourceware.org.