This is the mail archive of the 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: disable avx instructions at runtime

Mike Frysinger <vapier@...> writes:

> On Sunday 10 March 2013 17:35:29 Tim Blechmann wrote:
> > >> i'm using a debugger, that does not support avx instructions (at least
> > >> the back-in-time functionality doesn't). unfortunately, glibc/libm uses
> > >> some sort of runtime dispatching to provide an avx-implementation for
> > >> mathematical functions like sin or cos.
> > >
> > > yes, it uses cpuid to detect support.  there were bugs though in the
> > > implementation in older releases that caused it to get used when it
> > > shouldn't. try using glibc-2.17.

> sounds like your replay engine is broken then.  i don't understand why people
> don't just fix the source of the problem.  valgrind had a similar issue -- it
> didn't properly emulate cpuid, so people requested we disable things in glibc
> instead of updating valgrind.
> -mike




Sorry to come in on this discussion at a late date. I'm the product manager
for TotalView, the product Tim is referring to.

I'd like to chime in and point out that we're not blind to the problem and
are actively working to extend TotalView ReplayEngine support to include AVX
instructions. Unfortunately that turns out to  not be a trivial task at all.
Meanwhile, we are looking at possible work arounds to get this working for
customers like Tim.

Are you reasonably sure (or is there anyone else on this list who can
chime in) that this dispatch mechanism in libm is based on the cpuid().
If so that gives us a possible mechanism to provide at least an interim
solution for our users.

I'd be grateful for any insight you or the others on this list can provide.


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