This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [patch] libgcj enable hash_syncronization & pthread_slow on darwin
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: toa at pop dot agri dot ch (Andreas Tobler)
- Cc: mckinlay at redhat dot com (Bryce McKinlay), gcc-patches at gcc dot gnu dot org (GCC Patches), java-patches at gcc dot gnu dot org (Java Patches), geoffk at geoffk dot org (Geoffrey Keating)
- Date: Mon, 5 Jul 2004 17:25:12 -0400 (EDT)
- Subject: Re: [patch] libgcj enable hash_syncronization & pthread_slow on darwin
>
> Bryce McKinlay wrote:
>
> > Andreas Tobler wrote:
> >
> >> the attached patch enables enable_hash_synchronization_default and
> >> slow_pthread_self on darwin. The hash sync part is necessary to get
> >> some swing stuff working. Without we hang forever.
> >> About the benefit of slow_pthread_self I'm not quite sure. Maybe it
> >> would help on a G5?
> >
> >
> >
> > I do wonder if slow_pthread_self is neccessary on darwin.
> > Presumably/hopefully their ABI has a fast way to get the Thread ID? If
> > so then then the slow_pthread_self implementation may actually end up
> > being slower than a pthread_self() call, because it requires a read
> > barrier. We plan to remove slow_pthread_self eventually for Linux, once
> > most people are using nptl.
> >
> > Otherwise, this patch looks good.
>
> Thanks!
>
> I give it a test run without slow_pthread_self.
> Is there an easy method to check the performance?
Here is how pthread_self done on PPC Darwin:
on G3 (750) and G4(74xx):
a system call so it calls into the kernel.
on G5 (970):
one instruction, a move from special register which can be accessed from
user
Andrew