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: RFC: Test optimizations for multiple architectures


I'd be more inclined to provide some mechanism to mask the feature flags
that are used to decide which function to chose, somewhat analogous to
LD_HWCAP_MASK.  For the implementations used with ifunc, an environment
variable like that isn't necessarily what makes sense.  There could be a
special libc function that you call with a mask, either a mask of the
hardware cpuid bits (gets hairy quickly), or, if it's purely a private
function for internal use only, a mask of the internal form that
init-arch.h uses.  Then the tester could do multiple runs of all the tests,
with different permutations of which bits are set.

I'm not very sanguine about doing a special build of the library just for
testing the multi-arch code.

Conceivably it could make sense to make this a user-accessible feature too.
I'm sure one day there will be some bug or performance workaround issue
where someone wants to tweak the selection of functions at runtime.  But
there is not really any good interface for that, so we probably should not
be eager to decide it.  If we have a GLIBC_PRIVATE entry point that we use
in our tests, then it will always be possible for someone sufficiently
desperate to write a LD_PRELOAD kludge that calls it or suchlike.


Thanks,
Roland


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