This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 4.1/4.2/4.3 PATCH: Switch boehm-gc to pthreads on Solaris (boehm-gc/21940, boehm-gc/21942)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]