]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ChangeLog
Cache the text section offset of shared libraries
authorHannes Domani <ssbssa@yahoo.de>
Sat, 21 Dec 2019 16:08:14 +0000 (17:08 +0100)
committerHannes Domani <ssbssa@yahoo.de>
Thu, 23 Jan 2020 17:44:27 +0000 (18:44 +0100)
commitc162ed3e66aa985fa2e79d0e7ccd2da80a532c1e
treeeab65ab7be42099b34e1d584bdc5500af23f5579
parent24e648d4b80268c164ba1e1eecb581bf9c42745f
Cache the text section offset of shared libraries

Each time a dll is loaded, update_solib_list is called.
This in turn calls deep down xfer_partial -> windows_xfer_shared_libraries,
which calls windows_xfer_shared_library for each loaded dll,
and pe_text_section_offset reads the dll for the text section offset.

Also if the data provided by xfer_partial is bigger than 4K,
then all of this is done for each 4K chunk (see target_read_alloc_1).

Caching of the text section offset improves the startup time of
an application with >300 dynamically loaded plugins from 2m10s to 10s.
And the shutdown time improves from 2m to 2s.

gdb/ChangeLog:

2020-01-23  Hannes Domani  <ssbssa@yahoo.de>

* i386-cygwin-tdep.c (core_process_module_section): Update.
* windows-nat.c (struct lm_info_windows): Add text_offset.
(windows_xfer_shared_libraries): Update.
* windows-tdep.c (windows_xfer_shared_library):
Add text_offset_cached argument.
* windows-tdep.h (windows_xfer_shared_library): Update.
gdb/ChangeLog
gdb/i386-cygwin-tdep.c
gdb/windows-nat.c
gdb/windows-tdep.c
gdb/windows-tdep.h