mirror of
git://sourceware.org/git/libabigail.git
synced 2025-02-08 17:47:13 +00:00
Performance profiling has shown that accessing shared_ptr to canonical types and function type during type comparison was noticeable slowing down the process. This patch thus access naked pointers for canonical types and function types at these performance hot spots. The profiling took place while running abidw --abidiff on the r300_dri.so binary. * include/abg-ir.h (type_base::get_naked_canonical_type): Declare new accessor. (function_decl::get_naked_canonical_type): Likewise. (function_decl::set_type): Pass a reference to the shared_ptr. * src/abg-ir.cc (type_base::priv::naked_canonical_type): New data member. (type_base::priv::priv): Initialize it. (canonicalize): Set the naked canonicalize type when we set its shared pointer. (type_base::get_naked_canonical_type): Define new accessor. ({pointer_type_def,reference_type_def,function_type,class_decl}::operator==): Use naked canonical pointers rather than the slower shared_ptr to canonical pointers. (function_decl::priv::naked_type_): New data member. (function_decl::priv::priv): Initialize it. (function_decl::get_naked_type): Define new accessor. (function_decl::set_type): Pass a reference to the shared_ptr . (equals): In the overload for function_decl, use the faster naked pointers to the type of the function. 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-ir.h | ||
abg-libxml-utils.h | ||
abg-libzip-utils.h | ||
abg-reader.h | ||
abg-sptr-utils.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-writer.h | ||
Makefile.am |