This is the mail archive of the
mailing list for the glibc project.
Re: disable avx instructions at runtime
- From: Chris <Chris dot Gottbrath at roguewave dot com>
- To: libc-help at sourceware dot org
- Date: Tue, 16 Jul 2013 16:40:31 +0000 (UTC)
- Subject: Re: disable avx instructions at runtime
- References: <khi16n$tqf$1 at ger dot gmane dot org> <201303101729 dot 06096 dot vapier at gentoo dot org> <513CFCA1 dot 9040400 at klingt dot org> <201303102013 dot 36683 dot vapier at gentoo dot org>
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.
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.