public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Matthias Klose <doko@ubuntu.com>
To: GCJ-patches <java-patches@gcc.gnu.org>
Cc: Andrew Haley <aph@redhat.com>,
	NightStrike <nightstrike@gmail.com>,
	 Ivan Maidanski <ivmai@mail.ru>, Boehm GC <gc@linux.hpl.hp.com>,
	Kai Tietz <ktietz70@googlemail.com>
Subject: Re: [Gc] Re: boehm-gc merge for GCC
Date: Mon, 26 Nov 2012 15:08:00 -0000	[thread overview]
Message-ID: <50B385C5.6010004@ubuntu.com> (raw)
In-Reply-To: <50ABADE0.9000305@redhat.com>

Am 20.11.2012 17:20, schrieb Andrew Haley:
> On 11/17/2012 01:53 AM, Matthias Klose wrote:
>> Would it be possible to create a branch in the GCC svn, and then prepare the
>> merge, and libjava and libobjc changes there?
> 
> Certainly.

I had a look at the merge this weekend, but didn't get that far. It's an
"interesting" merge after seven years. Basically I did get the 6.6 release (the
last one imported into GCC), and current GCC and bdwgc trunks, tracked moved
files, and tried a three way merge on the ones where a simple patch showed
conflicts, and still had some hundred conflicts on about 20-30 files. The
two-way diffs show only very few chunks, because with tab expansion in comments
and code, and the removal of the pre ansi function decls, there's a lot for change.

Is there any better way to do the merge?  As an alternative, I removed
everything in GCC, copied the bdwgc trunk and re-added the configury. Then
verified that I could build a biarch compiler with --enable-objc-gc, and had a
basic testcase running, plus the bdwgc tests succeeding.

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?

- 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?

- minor issue in boehm.cc:
int
 _Jv_SetGCFreeSpaceDivisor (int div)
 {
-  return (int)GC_set_free_space_divisor ((GC_word)div);
+  GC_set_free_space_divisor ((GC_word)div);
+  return (int)GC_get_free_space_divisor ();
 }

- minor issue in gnu/gcj/util/natGCInfo.cc:
  GC_GCJ_SUPPORT needs to defined before including dbg_mlc.h.

- 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.

- Plus renamed some bdwgc header files to what libjava expects.


Changes in bdwgc included:

- 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.

- Renamed config.h.in to gc_config.h.in (could that be done upstream)?

- bdwgc now has a tests subdir, however with test cases not in the same
  places as testsuite in GCC. How should that be dealt with?
  Test cases were upstream'd, however the dejagnu directives are
  missing.

- bdwgc now has it's own ChangeLog file. Renamed the GCC one to
  ChangeLog.gcc.

- 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? So a new library would need adding (bdwgc is prepared to add
  it in a subdir too).

- Dropping of some arch specific files like mips_*. So maybe trunk
  did drop support for some archs, which the boehm-gc in GCC still
  supports. Didn't check that further.


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?

  Matthias

      reply	other threads:[~2012-11-26 15:08 UTC|newest]

Thread overview: 4+ 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>
2012-11-17  1:54         ` Matthias Klose
2012-11-18  7:52           ` NightStrike
2012-11-20 16:21           ` Andrew Haley
2012-11-26 15:08             ` Matthias Klose [this message]

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=50B385C5.6010004@ubuntu.com \
    --to=doko@ubuntu.com \
    --cc=aph@redhat.com \
    --cc=gc@linux.hpl.hp.com \
    --cc=ivmai@mail.ru \
    --cc=java-patches@gcc.gnu.org \
    --cc=ktietz70@googlemail.com \
    --cc=nightstrike@gmail.com \
    /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).