This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: What do IFUNC resolvers need to be useful?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]