This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: What do IFUNC resolvers need to be useful?
- From: Aurelien Jarno <aurelien at aurel32 dot net>
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 4 Mar 2016 19:23:34 +0100
- Subject: Re: What do IFUNC resolvers need to be useful?
- Authentication-results: sourceware.org; auth=none
- References: <56D9BAE0 dot 3000102 at redhat dot com>
On 2016-03-04 11:42, Carlos O'Donell wrote:
> Should IFUNC resolver get passed in a pointer to the
> environment?
I think that it would be a great improvement.
One can imagine to use that on the libc for example to temporarily
disable the optimized functions. That can be useful for debugging,
but also in our testsuite to test the various versions of a function.
One can also use an environment variable to enable logging, checking
or debugging without performance impact.
And I am sure people can have a lot more imagination about what to do
with such a possibility. Probably good things, but also bad things...
> Aside from AT_HWCAPS, it would seem to me that the environment
> would be the next most useful thing to control resolver behaviour
> from the command line.
>
> Anything else?
Yes when using IFUNC to provide optimized version of some functions,
there is a need to determine the CPU capabilities. AT_HWCAP and
AT_HWCAP2 provide an easy way to do that. Alternatively we can pass
the whole auxiliary vector, that can give access to more values.
I guess one can imagine the use of at least AT_PAGESZ and AT_SECURE.
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net