This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ #15533] Avoid unnecessary slowdown from profiling with audit
- From: Roland McGrath <roland at hack dot frob dot com>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Alexander Monakov <amonakov at ispras dot ru>
- Date: Wed, 25 Sep 2013 13:03:18 -0700 (PDT)
- Subject: Re: [PATCH][BZ #15533] Avoid unnecessary slowdown from profiling with audit
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LNX dot 2 dot 00 dot 1305250406320 dot 23866 at monopod dot intra dot ispras dot ru> <alpine dot LNX dot 2 dot 00 dot 1308201645010 dot 2626 at monopod dot intra dot ispras dot ru> <20130908193936 dot GF27001 at domone dot kolej dot mff dot cuni dot cz> <20130925181103 dot GA8322 at domone dot podge>
I don't like the O(n) check on every _dl_relocate_object. I think a better
approach, which would improve performance of all the hooked places and not
just PLT resolution, would be to maintain a set of flags in a bitmask
variable next to _dl_audit. The setup code in dl_main would set the bit
for a given hook when any audit module defines that hook. Then all the
places that loop over the _dl_audit list to check if each one has a
particular hook would guard that loop with a check of the bit corresponding
to that hook.
Thanks,
Roland