libabigail/tests/data/test-fedabipkgdiff/test2-dbus-glib-0.100.2-2.fc20--dbus-glib-0.106-1.fc23-report-0.txt
Dodji Seketeli f6bca156ca Make abipkgdiff.cc use the abigail::workers interface
With this patch, the code of abipkgdiff.cc doesn't use the pthreads
API directly anymore.  Rather, it uses the higher level "Workers
Queue" API provided by the abigail::workers namespace.

The main benefits are:

 - better code readability and maintainability.  The code base doesn't
   have any global variable anymore.  This is going to be helpful when
   adding new features to the abipkgdiff.cc code base.

 - faster code.  The tests/runtestdiffpkg test program executes on ~
   17s without the patch, and on ~ 11s with the patch on my old X220
   laptop.

	* tools/abipkgdiff.cc: Remove ftw.h, pthread.h, unistd.h, add
	fts.h and abg-workers.h.
	(verbose, elf_file_paths_tls_key, reports_map, env_map, map_lock)
	(arg_lock, prog_options): Remove all these global variables.
	(struct package_descriptor): Remove this type.
	(pthread_routine_extract_package)
	(first_package_tree_walker_callback_fn)
	(second_package_tree_walker_callback_fn, pthread_routine_compare)
	(pthread_join, pthread_routine_extract_pkg_and_map_its_content):
	Remove these functions.
	(options::{num_workers, verbose}): Define new data members.
	(options::options): Initialize the new verbose and num_workers data members.
	(package::erase_extraction_directory)
	(erase_created_temporary_directories_parent): Take the program
	options in parameter.  Don't use the global verbose variable
	anymore.
	(package::erase_extraction_directories)
	(erase_created_temporary_directories, extract_package): Take the
	program options in parameter.
	(extract_rpm, extract_deb, extract_tar): Likewise.  And don't use
	the global verbose variable anymore.
	(compare): Don't use the global verbose variable anymore.  Use the
	new compare_task type along with the abigail::workers::queue type.
	(pkg_extraction_task, pkg_prepare_task, compare_task)
	(comparison_done_notify): Define new classes.
	(maybe_update_vector_of_package_content): Define new static
	function.
	(create_maps_of_package_content): Don't take the ftw_cp_type
	anymore.  Don't use the global verbose variable anymore.  Use the
	fts_{open,read,close} functions, rather than the ftw one.
	(extract_package_and_map_its_content): Don't use pthreads anymore.
	Use the new pkg_extraction_task type created along with the
	abigail::workers::queue type.
	(prepare_packages): Don't use pthreads anymore.  Use the new
	pkg_prepare_task type along with the abigail::workers::queue type.
	(elf_size_is_greater): Adjust to use
	abigail::workers::queue::tasks, rather than the previous
	compaer_args_sptr type.
	(parse_command_line): Adjust to stop using the global verbose
	variable.
	(main): Remove use of global variables prog_options and also the
	packages variable.
	* tests/data/test-diff-pkg/dbus-glib-0.104-3.fc23.x86_64--dbus-glib-0.104-3.fc23.armv7hl-report-0.txt:
	Adjust.
	* tests/data/test-diff-pkg/dirpkg-0-report-0.txt: Likewise.
	* tests/data/test-diff-pkg/test-dbus-glib-0.80-3.fc12.x86_64-report-0.txt:
	Likewise.
	* tests/data/test-diff-pkg/test-rpm-report-0.txt: Likewise.
	* tests/data/test-diff-pkg/test-rpm-report-1.txt: Likewise.
	* tests/data/test-diff-pkg/test-rpm-report-2.txt: Likewise.
	* tests/data/test-diff-pkg/test-rpm-report-3.txt: Likewise.
	* tests/data/test-fedabipkgdiff/test0-from-fc20-to-fc23-dbus-glib-report-0.txt:
	Likewise.
	* tests/data/test-fedabipkgdiff/test1-from-fc20-to-dbus-glib-0.106-1.fc23.x86_64-report-0.txt:
	Likewise.
	* tests/data/test-fedabipkgdiff/test2-dbus-glib-0.100.2-2.fc20--dbus-glib-0.106-1.fc23-report-0.txt:
	Likewise.
	* tests/data/test-fedabipkgdiff/test3-dbus-glib-0.100.2-2.fc20.i686--dbus-glib-0.106-1.fc23.i686-report-0.txt:
	Likewise.
	* tests/data/test-fedabipkgdiff/test4-glib-0.100.2-2.fc20.x86_64.rpm-glib-0.106-1.fc23.x86_64.rpm-report-0.txt:
	Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2017-02-27 10:15:33 +01:00

64 lines
2.6 KiB
Plaintext

Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.i686.rpm and dbus-glib-0.106-1.fc23.i686.rpm:
================ changes of 'libdbus-glib-1.so.2.2.2'===============
Functions changes summary: 0 Removed, 0 Changed, 2 Added functions
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
2 Added functions:
'function DBusGConnection* dbus_g_connection_open_private(const gchar*, GMainContext*, GError**)' {dbus_g_connection_open_private}
'function DBusGConnection* dbus_g_method_invocation_get_g_connection(DBusGMethodInvocation*)' {dbus_g_method_invocation_get_g_connection}
================ end of changes of 'libdbus-glib-1.so.2.2.2'===============
================ changes of 'dbus-binding-tool'===============
Functions changes summary: 2 Removed, 0 Changed, 1 Added functions
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
Function symbols changes summary: 0 Removed, 0 Added function symbol not referenced by debug info
Variable symbols changes summary: 2 Removed, 0 Added variable symbols not referenced by debug info
2 Removed functions:
'function BaseInfo* base_info_ref(BaseInfo*)' {base_info_ref}
'function void base_info_unref(BaseInfo*)' {base_info_unref}
1 Added function:
'function int main(int, char**)' {main}
2 Removed variable symbols not referenced by debug info:
stderr
stdout
================ end of changes of 'dbus-binding-tool'===============
Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.x86_64.rpm and dbus-glib-0.106-1.fc23.x86_64.rpm:
================ changes of 'libdbus-glib-1.so.2.2.2'===============
Functions changes summary: 0 Removed, 0 Changed, 2 Added functions
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
2 Added functions:
'function DBusGConnection* dbus_g_connection_open_private(const gchar*, GMainContext*, GError**)' {dbus_g_connection_open_private}
'function DBusGConnection* dbus_g_method_invocation_get_g_connection(DBusGMethodInvocation*)' {dbus_g_method_invocation_get_g_connection}
================ end of changes of 'libdbus-glib-1.so.2.2.2'===============
================ changes of 'dbus-binding-tool'===============
Functions changes summary: 2 Removed, 0 Changed, 0 Added functions
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
2 Removed functions:
'function BaseInfo* base_info_ref(BaseInfo*)' {base_info_ref}
'function void base_info_unref(BaseInfo*)' {base_info_unref}
================ end of changes of 'dbus-binding-tool'===============