libabigail/include
Dodji Seketeli 0af65e6364 Fix performance regression while analyzing libjvm.so
abidiff libjvm.so libjvm.so is taking forever in the master branch
these days.  At some point it was taking ~ 15 minutes and 15GB of RAM
on a non-optimized build.

Profiling of CPU usage showed that sorting virtual member
functions of a class whenever a new virtual member function is added
was the hot spot.

This patch now sorts virtual member functions once right after the
type was canonicalized.  The patch adds a virtual function
type_base::on_canonical_type_set() that is invoked right after the
canonical type is set for a given type.  class_decl gets its own
version of that virtual function: class_decl::on_canonical_type_set.
In that function, the patch does sort the virtual member functions of
the current class_decl.

Now with this patch, abidiff is still taking around 15 minutes but it
consumes less than 12GB of ram.  This means the memory consumption was
reduced by 20%.  abipkgdiff performs on 16:30 minutes and in less than
12GB of RAM as well.  All these times are measured on a non-optimized
build.

	* include/abg-ir.h ({type_base,
	class_decl}::on_canonical_type_set): Declare new virtual member
	function.
	* src/abg-ir.cc (type_base::on_canonical_type_set): Define new
	virtual member function that does nothing.
	(class_decl::on_canonical_type_set): Define new virtual member
	function that sorts the virtual member functions of class_decl.
	(canonicalize): Invoke type_base::on_canonical_type_set when the
	canonical type is set.
	(fixup_virtual_member_function): Don't sort virtual member
	functions here.
	* src/abg-dwarf-reader.cc (finish_member_function_reading): Do not
	sort virtual member functions here.
	* tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust.
	* tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
	* tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
	* tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
	* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2017-01-16 19:25:36 +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 Fix performance regression while analyzing libjvm.so 2017-01-16 19:25:36 +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