This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: Thread local allocation
- From: "Boehm, Hans" <hans_boehm at hp dot com>
- To: "'Bryce McKinlay'" <bryce at waitaki dot otago dot ac dot nz>, java at gcc dot gnu dot org
- Date: Tue, 12 Feb 2002 09:51:16 -0800
- Subject: RE: Thread local allocation
There are two reasons it isn't enabled for *-*-linux*:
1) I can only test X86 and Itanium.
2) Some of the code, particularly in specific.c, assumes an Itanium-like or
stronger memory model. In particular, if you look at the code for
setspecific(), it would need a memory barrier on Alpha, as would the
corresponding inlined getspecific routine.
I would vote for turning this on on a case-by-case basis, after some
(multiprocessor!) testing. I would guess that for a SPARC running in TSO
mode, it's safe to turn it on as it is. The same is probably true for MIPS.
For Alpha, it may be safe to turn on if you define USE_PTHREAD_SPECIFIC, so
that it uses the official pthread-defined thread local storage primitives
instead of my (faster on X86) hack. Or you would have to add the memory
barriers. I don't claim to know anything about the PowerPC memory model,
but I suspect that if it works for Alpha, it probably works on PowerPC, too.
Hans
> -----Original Message-----
> From: Bryce McKinlay [mailto:bryce@waitaki.otago.ac.nz]
> Sent: Monday, February 11, 2002 8:29 PM
> To: java@gcc.gnu.org
> Subject: Thread local allocation
>
>
> I noticed that boehm-gc/configure.in only switches on
> THREAD_LOCAL_ALLOC
> for x86 and IA64 Linux. Is there any reason not to enable it
> for *-*-linux*?
>
> regards
>
> Bryce.
>
>