diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2025-04-17 15:37:25 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2025-04-20 01:01:57 -0400 |
commit | 234325b503e1fa486e8990b1addc319d25a44cde (patch) | |
tree | 08e9be6b0c8c05339507601a76bd7dd322130482 /gdb/testsuite/gdb.base/async-shell.c | |
parent | 62e6a508424da132949c0880a5deada6be5f05d0 (diff) | |
download | binutils-234325b503e1fa486e8990b1addc319d25a44cde.zip binutils-234325b503e1fa486e8990b1addc319d25a44cde.tar.gz binutils-234325b503e1fa486e8990b1addc319d25a44cde.tar.bz2 |
gdb/dwarf: look up .dwp file ahead of time
get_dwp_file lazily looks for a .dwp file for the given objfile. It is
called by indexing workers, when a cutu_reader object looks for a DWO
file. It is called with the "dwo_lock" held, meaning that the first
worker to get there will do the work, while the others will wait at the
lock.
I'm trying to reduce the time where this lock is taken and do other
refactorings to make it easier to reason about the DWARF reader code.
Moving the lookup of the .dwp file ahead, before we start parallelizing
work, helps makes things simpler, because we can then assume everywhere
else that we have already checked for a .dwp file.
Put the call to open_and_init_dwp_file in dwarf2_has_info, right next to
where we look up .dwz files. I used the same try-catch pattern as for
the .dwz file lookup.
Change-Id: I615da85f62a66d752607f0dbe9f0372dfa04b86b
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/testsuite/gdb.base/async-shell.c')
0 files changed, 0 insertions, 0 deletions