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: Eliminate gc.h warning


I think it's currently too big a hammer.  Libjava/boehm.cc tests THREAD_LOCAL_ALLOC
in order to determine whether it should use thread local allocation.  AFAICT
the patch would implicitly turn that off, resulting in a significant performance
degradation on some platforms, including Linux/X86.

We also currently still include private/gc_pmark.h, which includes gc_priv.h,
which declares a data structures which may depend in GC configuration.  At best
we're likely to end up with conflicting debug information for some of those data
structures.

Clearly we should move towards removing the GC configuration flags from libjava.
And I don't think it's impossible.  But I think it requires more careful
examination, and probably 

1) A bit of restructuring in the gc to avoid the gc_priv.h inclusion.
2) Some configury changes to set the equivalent of THREAD_LOCAL_ALLOC from a higher level.

Hans

> -----Original Message-----
> From: Zack Weinberg [mailto:zack@codesourcery.com]
> Sent: Thursday, July 03, 2003 1:06 PM
> To: gcc-patches@gcc.gnu.org
> Cc: java-patches@gcc.gnu.org
> Subject: Re: Eliminate gc.h warning
> 
> 
> Matt Kraai <kraai@alumni.cmu.edu> writes:
> 
> > On Tue, Jul 01, 2003 at 11:21:51PM -0700, Zack Weinberg wrote:
> >> Matt Kraai <kraai@alumni.cmu.edu> writes:
> >> 
> >> > Howdy,
> >> >
> >> > boehm-gc/include/gc.h generates the following warning:
> >> >
> >> >  In file included from 
> ../../../../gcc/libjava/java/lang/natObject.cc:282:
> >> >  ../../../../gcc/boehm-gc/include/gc.h:53:1: warning: 
> "GC_LINUX_THREADS" redefined
> >> >  <command line>:12:1: warning: this is the location of 
> the previous definition
> >> >
> >> > The following patch eliminates this warning.
> >> 
> >> Instead, (a) figure out whether it is actually necessary to define
> >> this on the command line, and if not, take it off; (b) if it is,
> >> #define GC_LINUX_THREADS 1 instead of wrapping it in #if !defined.
> >
> > The following patch omits the contents of boehm-cflags from the
> > libjava compile line.
> 
> That's an awfully big hammer you got there.  This may well be the
> right thing to do but I want someone who *understands* Boehm GC to
> comment.
> 
> zw
> 


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