This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Excessive calls to iterate_phdr during exception handling
- From: Richard Henderson <rth at redhat dot com>
- To: Ryan Johnson <ryan dot johnson at cs dot utoronto dot ca>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, Ian Lance Taylor <iant at google dot com>, gcc at gcc dot gnu dot org
- Date: Fri, 31 May 2013 08:44:35 -0700
- Subject: Re: Excessive calls to iterate_phdr during exception handling
- References: <51A3DC25 dot 90401 at cs dot utoronto dot ca> <CAKOQZ8y36SyH5DgU9ZLT1AuVkd0MLOn7ZrFzZ2aoz4CQZV3txw at mail dot gmail dot com> <CAFiYyc2Q5dn7EK=7R6YbOQk8Rk6hJyr4GG20LEg+ucQ97aNxCg at mail dot gmail dot com> <51A7E0FD dot 4010605 at cs dot utoronto dot ca>
On 05/30/2013 04:30 PM, Ryan Johnson wrote:
> Is there a way for libgcc_s to interpose on dlopen/dlclose if (and only if)
> those are present? If so, the wrappers could increment an atomic version
> counter, which would be plenty accurate for invalidating an object header
> cache, without requiring any changes to glibc.
You'll note that we already have a cache, which gets invalidated by changes
to the dlpi_adds and dlpi_subs members of dl_phdr_info.
It's a space-limited LRU cache though, so I don't see a way to reduce the set
of code that must live under the dl_iterate_phdr mutex.
r~