This is the mail archive of the java-discuss@sources.redhat.com 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]

Re: ObjC configured --with-objc-gc needs external Boehm gc


>>>>> "Matthias" == Matthias Klose <doko@cs.tu-berlin.de> writes:

Matthias> The Objective C runtime library enabled with garbage
Matthias> collection needs an external Boehm gc collector beeing
Matthias> installed at compile time. Is it possible to build the
Matthias> libobjcgc library with the Boehm gc that is already used for
Matthias> gcj?

The boehm-gc in the gcc tree is a mildly modified version of the
standard Boehm collector.  Basically we modified it to use autoconf
and automake so that it would fit into the existing gcc build system.

However, the Boehm GC is designed so that many of its options can only
be set at build time, and not at runtime.  So we've set things up to
configure the GC to be appropriate for our runtime environment.  It
might or might not work in other environments.

For instance, we define these options:

    AC_DEFINE(SILENT)
    AC_DEFINE(NO_SIGNALS)
    AC_DEFINE(JAVA_FINALIZATION)
    AC_DEFINE(GC_GCJ_SUPPORT)

When cross-compiling we also assume that we're targeting a smaller
or embedded system and enable these options:

    AC_DEFINE(NO_SIGSET)
    AC_DEFINE(NO_CLOCK)
    AC_DEFINE(SMALL_CONFIG)
    AC_DEFINE(NO_DEBUGGING)


I'm not against having other uses for the boehm-gc.  However, ideally
these other uses wouldn't result in performance loss for Java
programs.  The GC is a critical component for us; we've gotten
significant performance improvements by tweaking it.  Untweaking would
be bad for us.

One idea would be to work with Hans Boehm to see if some of these
configuration options can be made runtime configurable without
(significant) performance impact.

Tom

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