This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: Two quick GC questions [was Re: [REVIVED: PATCH PR42811,4.5 regression] java.lang.ExceptionInInitializerError in ecj1]
- From: "Boehm, Hans" <hans dot boehm at hp dot com>
- To: Bryce McKinlay <bmckinlay at gmail dot com>, Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- Cc: GCC Java <java at gcc dot gnu dot org>
- Date: Fri, 19 Feb 2010 03:21:08 +0000
- Subject: RE: Two quick GC questions [was Re: [REVIVED: PATCH PR42811,4.5 regression] java.lang.ExceptionInInitializerError in ecj1]
- References: <4B6C9B26.3010106@gmail.com> <4B6D0C67.5030500@gmail.com> <4B78BA6D.5000603@gmail.com> <7230133d1002150504r23738e28if92303426c349661@mail.gmail.com> <4B7CC61E.1050709@gmail.com> <4B7D631B.8030401@gmail.com> <4B7DA9FA.1020307@gmail.com> <7230133d1002181413h5c6abcf8ge7a989349e0fa3c0@mail.gmail.com>
> From: Bryce McKinlay
>
> In theory, there could also be a performance advantage to
> having a single library because a smart linker / linker
> script could optimize internal calls to things like
> GC_malloc, speeding up the allocation path by avoiding PLT
> indirection.
>
> Bryce
>
Also in theory, in this case, you should be able to have your cake and eat it, too. The idea was that we should be able to inline the fast path that looks only at a small collection of the thread-local free-lists, but then calls into the GC library on the slow path. GC7.x generally has the infratsructure for that. But it's not clear anyone has the time to do this. Last time I looked into this, the current gcj allocation path is still much slower than one would like, so this should help.
Hans