mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-18 16:04:34 +00:00
a9e01ad6e9
Profiling showed that getting the pointed-to type of a pointer type is on the hot spot when comparing corpora with a lot of entry points with a lot of pointer types reachable from the entry points of the corpora. So avoid handling the shared_ptr to the pointed-to type for that case can save us a few CPU cycles in a noticeable way. This patch does this by creating a new pointer_type_def::get_naked_pointed_to_type() (that returns a naked pointer) to supplement the classic pointer_type_def::get_pointer_to_type() function, and uses that in a code spot that profiling revealed to be a critical path. * include/abg-ir.h (pointer_type_def::get_naked_pointed_to_type): Declare new member function. * src/abg-ir.cc (pointer_type_def::priv::naked_pointed_to_type_): New data member. (pointer_type_def::priv::priv): Adjust to initialize the new data member. (pointer_type_def::pointer_type_def): Adjust to use the constructor pointer_type_def::priv::priv to initialize the pointed-to type (including its new naked pointer variant). So we do not have to initialize the priv_->pointed_to_type_ explicitely in the constructor anymore. (pointer_type_def::get_naked_pointed_to_type): Define new data member. (pointer_type_def::get_qualified_name): Use a naked pointer to the pointed-to type, rather than a smart pointer. 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 |