search for: real_tl

Displaying 3 results from an estimated 3 matches for "real_tl".

Did you mean: real_tx
2015 Aug 18
5
TSAN hack on AArch64 for Android
...en, I've looked at pthread_getspecific code in bionic and it is actually quite fast and does not call any other system function (except get_thread() which is basically an access to real tls). So we can use it, and then the whole support becomes merely: INLINE ThreadState *cur_thread() { #ifdef REAL_TLS return reinterpret_cast<ThreadState *>(&cur_thread_placeholder); #else return reinterpret_cast<ThreadState *>(pthread_getspecific(thread_key)); #endif } Which looks quite acceptable to me. Also we could try to ask android to dedicate a real tls slot for sanitizers (I don'...
2015 Aug 18
2
TSAN hack on AArch64 for Android
On Tue, Aug 18, 2015 at 8:28 PM, Kostya Serebryany <kcc at google.com> wrote: > +dvyukov > > On Mon, Aug 17, 2015 at 8:37 AM, Renato Golin <renato.golin at linaro.org> > wrote: >> >> Folks, >> >> The review of patch http://reviews.llvm.org/D11532 is extremely slow >> due to the number of hacks, left-overs and general undesired changes >>
2015 Aug 19
2
TSAN hack on AArch64 for Android
...a good plan. Doesn't > seem to be part of this patch, though. Nor it should, as it actually > should have been a preparatory patch, submitted after all interested > parties agreed that TLS emulation is the way to go. > > >> INLINE ThreadState *cur_thread() { >> #ifdef REAL_TLS >> return reinterpret_cast<ThreadState *>(&cur_thread_placeholder); >> #else >> return reinterpret_cast<ThreadState *>(__get_tls()[ANDROID_TSAN_TLS_SLOT]); >> #endif >> } >> >> Which is roughly the same code-wise, but faster and safer....