mirror of
git://sourceware.org/git/libabigail.git
synced 2025-03-06 14:47:32 +00:00
The Git repository of the Libabigail Project
While emitting an abixml output for a corpus_group representing the KMI of a Linux kernel tree, profiling shows that during comparison of class types, calling class_decl::get_definition_of_declaration is a hotspot. Especially, the fact the function returns a shared pointer that has to be "handled" shows up in the profile. This patch introduces a class_decl::get_naked_definition_of_declaration that returns a pointer. Not a shared pointer. The patch then uses that get_naked_definition_of_declaration function in the comparison code for class_decl. The patch also uses get_naked_canonical_type instead of get_canonical_type when comparing a bunch of other types. This makes things a little bit faster when compiled without optimization between 2% and 5%. * include/abg-ir.h (class_or_union::get_naked_definition_of_declaration): Declare a new member function. (class_decl::get_naked_definition_of_declaration): Likewise. * src/abg-ir.cc ({type_decl, qualified_type_def, array_type_def, enum_type_decl}::operator==): Use the get_naked_canonical_type and get_naked. (class_or_union::priv::naked_definition_of_declaration_): Define new data member. (class_or_union::priv::priv): Adjust to initialize the new data member. (class_or_union::get_naked_definition_of_declaration): Define new member function. ({class_or_union, class_decl}::operator==): Use the new get_naked_definition_of_declaration instead of get_definition_of_declaration. (equals): In the overload for class_or_union, do the same. (class_decl::get_naked_definition_of_declaration): Define new member function. (hash_type_or_decl): Likewise. 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.