This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: 4.1/4.2/4.3 PATCH: Switch boehm-gc to pthreads on Solaris (boehm-gc/21940, boehm-gc/21942)
- From: Rainer Orth <ro at techfak dot uni-bielefeld dot de>
- To: Andreas Tobler <toa at pop dot agri dot ch>
- Cc: java-patches at gcc dot gnu dot org, "Boehm, Hans" <hans dot boehm at hp dot com>
- Date: Wed, 20 Jun 2007 18:40:52 +0200 (MEST)
- Subject: Re: 4.1/4.2/4.3 PATCH: Switch boehm-gc to pthreads on Solaris (boehm-gc/21940, boehm-gc/21942)
- References: <18038.51714.367223.822866@manam.TechFak.Uni-Bielefeld.DE> <4678296D.4080504@pop.agri.ch>
Andreas Tobler writes:
> I tried this patch on solaris8 sparc and I saw an improvement in the
> libgcj test (32 and 64 bit). But I hang in the gctest. I might debug
> next week.
I've started a mainline bootstrap on Solaris 8 and found the same thing.
Even current gc 7.0 alpha has the same problem. Investigating further, I
found that the gctest binary built (and hanging) on Solaris 8 runs fine on
Solaris 10/11. This reminded me that the there used to be two alternative
libpthread implementations in Solaris 8 (one in /usr/lib, the other one in
/usr/lib/lwp). The latter became the default from Solaris 9 onward. If I
run gctest with LD_LIBRARY_PATH=/usr/lib/lwp, it runs fine even on Solaris
8.
The question is how to properly integrate this into the boehm-gc configury,
especially how to handle /usr/lib/lwp vs. /usr/lib/lwp/64.
> > Index: pthread_support.c
> > ===================================================================
> > --- pthread_support.c (revision 125718)
> > +++ pthread_support.c (working copy)
> > @@ -883,7 +883,8 @@ void GC_thr_init()
> > # if defined(GC_HPUX_THREADS)
> > GC_nprocs = pthread_num_processors_np();
> > # endif
> > -# if defined(GC_OSF1_THREADS) || defined(GC_AIX_THREADS)
> > +# if defined(GC_OSF1_THREADS) || defined(GC_AIX_THREADS) || \
> > + defined(GC_SOLARIS_PTHREADS)
>
> Minor nit, please put the logical operator on the next line:
>
> # if defined(GC_OSF1_THREADS) || defined(GC_AIX_THREADS) \
> || defined(GC_SOLARIS_PTHREADS)
Will do.
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University