public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bryce McKinlay <bmckinlay@gmail.com>
To: GCC Java <java@gcc.gnu.org>
Subject: [Gc] Re: boehm-gc merge for GCC
Date: Mon, 26 Nov 2012 17:03:00 -0000	[thread overview]
Message-ID: <CALUNu-pkdM8xXrJoCuJTW41zn0BiHntQLzC8=sLuHR2DbHVjbw@mail.gmail.com> (raw)
In-Reply-To: <CALUNu-p3muXCwGV9sRSF550EvyM2=f0=mbEzDEhtf=BdhUJKMQ@mail.gmail.com>

2012 at 3:07 PM, Matthias Klose <doko@ubuntu.com> wrote:

> I had a look at the merge this weekend, but didn't get that far. It's an
> "interesting" merge after seven years.


Hey Matthais,

Thanks very much for working on this! If its any help, my experience from
back in the day suggests that these merges always look much worse than they
actually are. So don't get too discouraged :)

> Then enabled java, and experimented until it did build. Some observations:
>
> - the suspend functions/patches (r114869, r124081) were never part
>   of upstream boehm-gc (GC_is_thread_suspended, GC_suspend_thread,
>   GC_resume_thread).  This is what Ivan means with Th"ere is a problem
>   is thread suspend/resume - bdwgc does not have such API but OTOH
>   suspend/resume is deprecated part of Java threads".
>   However is libjava able to deprecate this?


IIRC, we implemented these as part of debugging (JVMTI) support in libgcj.
The deprecated Java-level Thread.suspend(), etc, functions have never been
implemented in libgcj.

I don't think libgcj's JVMTI ever fully worked anyway, so IMO although these
would be "nice to have", they are not required. They could likely be
re-implemented later without too much hassle if anyone wants to resurrect
JVMTI.

> - gc_local_alloc.h and the GC_LOCAL_*MALLOC* macros and associated
> functions
>   are removed in bdwgc trunk.  What kind of functions should be used
>   instead?


I think this was just there to force thread-local allocation, and to make it
possible to switch thread-local on and off. It looks like in the modern
bdwgc, thread-local allocation is used by default if the collector is built
with THREAD_LOCAL_ALLOC enabled. So presumably, this can be removed and the
standard allocator functions used.

> - Ivan writes about "some gcj files should be changed to reflect
>   the changes in bdwgc API (e.g., thread registration)". It did
>   still build, without changing anything further.


libgcj doesn't do anything special here (afaik), except for foreign threads
attached from outside libgcj via CNI/JNI. It just relies on threads being
registered by the GC's pthread_create(), etc, intercepts. It doesn't look
like much has changed here in bdwgc?

> - configure.ac, Makefile.am, */*.am: build the convenience library,
>   and changed names to not install anything, added multilib bits.
>   Maybe the renaming of libgc.a to libgcjgc.a isn't needed anymore.


Yeah, the name doesn't matter too much since it's only built as a
convenience library.

> - bdwgc now depends on another library (libatomic-ops). Shouldn't GCC
>   be able to use it's atomic builtins for some supported targets at
>   least?


Yes, but it sounds like far more effort than its worth to go and change it
just for the sake of using builtins. Maybe libatomic-ops itself could be
made to use the builtins when available.

> So if the merge looks that problematic, maybe restart with trunk, maybe
> check it in as bdwgc, and have toplevel configury to decide which one to use
> until the update is stable, and then just drop the boehm-gc directory?


I'm not sure it's worth making it configure-time switchable. I'd just put it
on a branch, make sure it's working on the major platforms, and then merge
to trunk once the GCC tree goes back in to stage 1.

Bryce

       reply	other threads:[~2012-11-26 17:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1353097280.505328435@f161.mail.ru>
     [not found] ` <50A67667.7020600@ubuntu.com>
     [not found]   ` <CAF1jjLucRudE2a3gCZq6erkJKfs1nC+DicM+4f4moXJ5HPy9g@mail.gmail.com>
     [not found]     ` <1353099257.140499471@f123.mail.ru>
     [not found]       ` <CAF1jjLsA1nzLaJejMiAfzqZZ8btw37n0B3H7_qz-UrLvNQGqzA@mail.gmail.com>
     [not found]         ` <50A6EE27.4000605@ubuntu.com>
     [not found]           ` <50ABADE0.9000305@redhat.com>
     [not found]             ` <50B385C5.6010004@ubuntu.com>
     [not found]               ` <CALUNu-p3muXCwGV9sRSF550EvyM2=f0=mbEzDEhtf=BdhUJKMQ@mail.gmail.com>
2012-11-26 17:03                 ` Bryce McKinlay [this message]
2012-11-26 17:50                   ` Andrew Haley
2012-11-27  1:09                   ` Boehm, Hans
2012-12-01 20:50                   ` Matthias Klose
2012-12-02  2:51                     ` Matthias Klose

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALUNu-pkdM8xXrJoCuJTW41zn0BiHntQLzC8=sLuHR2DbHVjbw@mail.gmail.com' \
    --to=bmckinlay@gmail.com \
    --cc=java@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).