[llvm-dev] TSAN hack on AArch64 for Android

Renato Golin via llvm-dev llvm-dev at lists.llvm.org
Wed Aug 19 03:16:11 PDT 2015


On 19 August 2015 at 01:11, Dan Albert via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> It hasn't been obvious to me whether people mean real ELF TLS when they talk
> about __thread support, or just that we need the keyword to be supported
> somehow. The patch set that Joerg mentioned will do the TLS emulation via
> pthread_getspecific for us in the compiler/rtlib. If that's sufficient then
> we don't actually need any of that in TSAN, and neither will any other
> platform that lacks ELF TLS.

This seems like a simple and elegant solution to me. And it also
dismiss the notion that a proper implementation is always slower than
a hack, or that cross-project discussions are always slower than
changing a single project. Thanks Dan/Joerg, that has been extremely
enlightening.

Dmitry / Jason, have you guys tried that?

It may be a bit rough on the edges for now, but if you try to use
that, with the TSAN settings from Adhemerval's patch, you may get what
you want for free. If anything, you'll probably need a tweak or two,
specific to Android, but that's expected.

cheers,
--renato


More information about the llvm-dev mailing list