libabigail/include
Dodji Seketeli 367da46e7a Speed up pretty representing (function) types
During structural (function) type comparison, computing the pretty
representation of the type at hand appears high on performance profiles,
especially when type canonicalization wasn't really effective.

This patch adds a type_base::get_cached_pretty_representation() and a
function_type::get_cached_name() to cache the pretty representation of
a type, as well as the function type name.  This is way, the type
representation is computed just once and stored into a cache.
subsequent invocations of the function just look into the cache
instead of computing the representation again.

Note that we do this only for non-canonicalized types because these
types can still be modified, and so caching the representation of a
type that might be changed (and thus see its representation change)
leads to issue.  So the representation of non-canonicalized types is
not cached.

	* include/abg-ir.h (type_base::get_cached_pretty_representation):
	Declare new function.
	(function_type::get_cached_name): Likewise.
	* src/abg-ir.cc (get_method_type_name): Use the new
	type_base::get_cached_pretty_representation function.
	(type_base::priv::{internal_cached_repr_, cached_repr_}): Add new
	data members.
	(function_type::priv::{internal_cached_name_, cached_name_}):
	Likewise.
	(type_base::get_cached_pretty_representation): Define new
	function.
	(function_type::get_cached_name): Likewise.
	(type_base::get_canonical_type_for): Call
	type_base::get_cached_pretty_representation here, so the internal
	representation is cached right before canonicalization.
	(function_type::{mark_as_being_compared, unmark_as_being_compared,
	comparison_started}): Uset he new type_base::get_cached_name to
	speed up function type name retrieval.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2017-01-16 21:00:54 +01:00
..
abg-comp-filter.h Very light speed improvements 2016-11-29 17:08:19 +01:00
abg-comparison.h Bug 20887 - Show relative change of offsets 2016-12-02 21:29:28 +01:00
abg-config.h Add --version option to several libabigail tools 2015-11-16 12:54:10 +01:00
abg-corpus.h Update copyright year on a bunch of files 2017-01-05 12:51:49 +01:00
abg-diff-utils.h Constify some diff-utils functor operators 2015-09-21 10:46:06 +02:00
abg-dwarf-reader.h Support Linux Kernel binaries 2017-01-06 12:35:22 +01:00
abg-fwd.h Update copyright notice for abg-fwd.h, abg-ir.h and test-abidiff.cc 2017-01-16 15:36:20 +01:00
abg-hash.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-ini.h Support empty properties in INI files 2016-11-10 14:09:51 +01:00
abg-interned-str.h Cleanup namespace importing in abg-interned-str.h 2016-10-10 12:57:47 +02:00
abg-ir.h Speed up pretty representing (function) types 2017-01-16 21:00:54 +01: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 Drop suppressed ABI artifacts from the IR 2016-09-21 18:35:08 +02:00
abg-sptr-utils.h Setup per-corpus type maps indexed by type names 2016-11-29 16:16:43 +01:00
abg-suppression.h Support Linux Kernel ABI whitelist files 2017-01-06 12:41:57 +01:00
abg-tools-utils.h Support Linux Kernel ABI whitelist files 2017-01-06 12:41:57 +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