libabigail/include
Dodji Seketeli a9e01ad6e9 Optimize out some shared_ptr use
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>
2016-05-22 23:20:13 +02:00
..
abg-comp-filter.h Bug 17649 Avoid endless looping on diff graph with cycles 2015-02-21 15:16:48 +01:00
abg-comparison.h Plug leak of diffs of member variables of class type 2016-05-22 23:20:13 +02:00
abg-config.h Add --version option to several libabigail tools 2015-11-16 12:54:10 +01:00
abg-corpus.h Implement string interning for Libabigail 2016-02-24 15:13:20 +01:00
abg-diff-utils.h Constify some diff-utils functor operators 2015-09-21 10:46:06 +02:00
abg-dwarf-reader.h Add some apidoc to dwarf_reader 2016-05-06 18:18:07 +02:00
abg-fwd.h Light optimizations by passing reference to smart pointers around 2016-05-22 23:20:13 +02:00
abg-hash.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-ini.h Support source_location_not_in and source_location_not_regexp suppressions 2015-09-16 20:54:40 +02:00
abg-interned-str.h Implement string interning for Libabigail 2016-02-24 15:13:20 +01:00
abg-ir.h Optimize out some shared_ptr use 2016-05-22 23:20:13 +02:00
abg-libxml-utils.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-libzip-utils.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-reader.h Introduce the concept of environment 2015-09-07 23:35:29 +02:00
abg-sptr-utils.h Plug leak of regex_t in suppression engine 2016-05-22 23:20:13 +02:00
abg-suppression.h Implement a [suppress_file] suppression directive 2016-05-08 12:39:26 +02:00
abg-tools-utils.h Bug 19867 - abipkgdiff skips symbolic links 2016-03-25 13:52:02 +01:00
abg-traverse.h Canonicalize types either early or late after TU reading 2015-02-18 21:32:37 +01:00
abg-version.h.in Add --version option to several libabigail tools 2015-11-16 12:54:10 +01:00
abg-viz-common.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-viz-dot.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-viz-svg.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-workers.h Make API documentation of thread pools visible 2016-04-27 23:58:50 +02:00
abg-writer.h Update copyright years 2015-01-07 17:52:10 +01:00
Makefile.am Split suppression engine off of abg-comparison.{cc,h} 2016-05-08 12:29:57 +02:00