[m-rev.] Upgrade Boehm GC to 7.6.0

Paul Bone paul at bone.id.au
Tue Sep 20 13:49:47 AEST 2016


For review by anyone

I've tested this with hlc.gc, hlc.par.gc, asm_fast.gc, asm_fast.par.gc.stseg
on x86_64 Linux.  If anyone would like to test on other platforms that'd be
good, but it's also okay to test this once its on master.

---

Upgrade Boehm GC to 7.6.0

Upgrade Boehm GC from 7.4.x to 7.6.0 and libatomic_ops from 7.4.x to 7.4.4

.gitmodules:
boehm_gc:
    Update git submodule to new version of Boehm GC.

compiler/notes/upgrade_boehm_gc.html:
    Update notes about upgrading Boehm GC.

NEWS:
    Announce this change.
---
 .gitmodules                          |   2 +-
 NEWS                                 |   3 +
 boehm_gc                             |   2 +-
 compiler/notes/upgrade_boehm_gc.html | 157 +++++++++++++++++++++++++++--------
 4 files changed, 127 insertions(+), 37 deletions(-)

diff --git a/.gitmodules b/.gitmodules
index fda72ba..4e3c94b 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,5 +1,5 @@
 [submodule "boehm_gc"]
 	path = boehm_gc
 	url = ../bdwgc.git
-	branch = release-7_4-mercury
+	branch = release-7_6-mercury
 	update = checkout
diff --git a/NEWS b/NEWS
index 10c4b89..bf1c357 100644
--- a/NEWS
+++ b/NEWS
@@ -461,6 +461,9 @@ Changes to the extras distribution:
 * We have added support for Unicode and other enhancements to the lex and
   regex libraries.  Thanks to Sebastian Godelet.
 
+We have upgraded to the bundled Boehm GC to 7.6.0 and libatomic_ops to
+7.4.4.
+
 
 NEWS for Mercury 14.01.2
 ------------------------
diff --git a/boehm_gc b/boehm_gc
index 400df79..bc4bb6e 160000
--- a/boehm_gc
+++ b/boehm_gc
@@ -1 +1 @@
-Subproject commit 400df7995fa3b6b10ed6f1a016db701f63d1c287
+Subproject commit bc4bb6e6e40308a101405d5ae4701109c64a871a
diff --git a/compiler/notes/upgrade_boehm_gc.html b/compiler/notes/upgrade_boehm_gc.html
index 3bd3d66..55858d1 100644
--- a/compiler/notes/upgrade_boehm_gc.html
+++ b/compiler/notes/upgrade_boehm_gc.html
@@ -1,17 +1,19 @@
-
+<!--
+  vim: et sw=2 sts=2
+-->
 <html>
 <head>
 <title>
-	How to upgrade to a new version of Boehm Garbage Collector in Mercury.
+    How to upgrade to a new version of Boehm Garbage Collector in Mercury.
 </title>
 </head>
 
 <body
-	bgcolor="#ffffff"
-	text="#000000"
+    bgcolor="#ffffff"
+    text="#000000"
 >
 <H1>
-	How to upgrade to a new version of Boehm Garbage Collector in Mercury.
+    How to upgrade to a new version of Boehm Garbage Collector in Mercury.
 </H1>
 
 <P>
@@ -151,82 +153,167 @@ The final step is how to update Mercury's copy of the collector when there
 are changes upstream.
 At the time of writing there are some important patches on the collector's
 <code>release-7_4</code> branch (The TSX bug).
-Note that I did this before I'd mirrored the bdwgc repository in
-MercuryLanguage on github, so it uses the github-paul and origin remotes as
-follows.
-When reproducing this you will need to make changes accordingly.
 </p>
 
 <code><pre>
 $ git remote -v
-github  https://github.com/ivmai/bdwgc.git (fetch)
-github  https://github.com/ivmai/bdwgc.git (push)
-github-paul https://github.com/PaulBone/bdwgc.git (fetch)
-github-paul git at github.com:PaulBone/bdwgc.git (push)
-origin  /srv/scratch/dev/mercury_new/bdwgc.git (fetch)
-origin  /srv/scratch/dev/mercury_new/bdwgc.git (push)
+github-ivan https://github.com/ivmai/bdwgc.git (fetch)
+github-ivan https://github.com/ivmai/bdwgc.git (push)
+github-mercury https://github.com/Mercury-Language/bdwgc.git (fetch)
+github-mercury git at github.com:Mercury-Language/bdwgc.git (push)
+origin  ../bdwgc.git (fetch)
+origin  ../bdwgc.git (push)
 </pre></code>
 
 <p>
 Starting with libatomic_ops I update the <code>release-7_4</code> branch to
 the latest changes and then rebase Mercury's customisations (in the
-<code>release-7_4-mer</code> branch) on top of those.
+<code>release-7_4-mercury</code> branch) on top of those.
 </p>
 
 <code><pre>
 $ git checkout release-7_4
 $ git pull github-ivan release-7_4
-$ git push github-paul release-7_4          # Optional
-$ git checkout release-7_4-mer
-$ git pull github-paul release-7_4-mer
+$ git push github-mercury release-7_4          # Optional
+$ git checkout release-7_4-mercury
+$ git pull github-mercury release-7_4-mercury
 $ git rebase release-7_4
 </code></pre>
 
 <p>
-There is only one Mercury-specific change so this went smoothly.
+There are only two Mercury-specific change so this went smoothly.
+However, the second change commits some autogenerated files, this makes it
+easier to build libatomic_ops inside the Mercury tree.
+We need to regenerate those files.
+</p>
+
+<code><pre>
+$ ./autogen.sh
+$ git commit --amend -a
+</code></pre>
+
+<p>
+Double check that you got everything:
+</p>
+
+<code><pre>
+$ git status --ignored
+</pre></code>
+
+<p>
 Now, publish this change with <code>--force</code> because we are changing
 history.
 </p>
 
 <code><Pre>
-$ git push --force github-paul release-7_4-mer
-$ git push --force origin release-7_4-mer
+$ git tag release-7_4-mercury-20160915
+$ git push --force github-mercury release-7_4-mercury
+$ git push github-mercury --tags
 </pre></code>
 
 <p>
-Now do the same for boehm_gc
+Now do the same for boehm_gc,
+however I've documented two examples depending on what you're trying to
+acheive.
 </p>
 
+<ol>
+  <li>
+    <p>
+    Upgrade to a newer patch within the 7.4 release.
+    </p>
+
 <code><pre>
 $ git checkout release-7_4
 $ git pull github-ivan release-7_4
-$ git push github-paul release-7_4          # Optional
-$ git checkout mercury-7_4_2
-$ git pull github-paul mercury-7_4_2
+$ git push github-mercury release-7_4          # Optional
+$ git checkout release-7_4-mercury
+$ git pull github-mercury release-7_4-mercury
 $ git rebase release-7_4
 </pre></code>
 
+    <p>
+    This rebase hard two merge conflicts however they were simple.
+    </p>
+
+  </li>
+  <li>
+    <p>
+    Upgrade from the 7.4 release to the 7.6 release
+    </p>
+
+<code><pre>
+$ git checkout -b release-7_6 github-ivan/release-7.6
+$ git push github-mercury release-7_6          # Optional
+$ git checkout -b release-7_6-mercury release-7_4-mercury
+$ git rebase release-7_6
+</pre></code>
+
+    <p>
+    There were a number of conflicts and some patches have since been merged
+    upstream so I was able to drop them entirely.
+    </p>
+  </li>
+</ol>
+    
 <p>
-This rebase hard two merge conflicts however they were simple.
+Now I need to update the version of libatomic_ops we include with as a
+submodule in the boehm repository.
+If the branch name in libatomic_ops was changing I would need to check
+the .gitmodules file, but in this example it isn't.
 </p>
 
-<code><Pre>
-$ git push --force github-paul release-7_4-mer
-$ git push --force origin release-7_4-mer
+<code><pre>
+$ git submodule update --remote --checkout
+$ git add libatomic_ops
+$ git commit
 </pre></code>
 
 <p>
+Depending on which step we chose above,
+tag and push these changes.
+</p>
+
+<ol>
+  <li>
+<code><pre>
+$ git tag release-7_4-mercury-YYYYMMDD
+$ git push --force github-mercury release-7_4-mercury
+$ git push github-mercury --tags
+</pre></code>
+  </li>
+  <li>
+<code><pre>
+$ git tag release-7_6-mercury-20160916
+$ git push github-mercury release-7_6-mercury
+$ git push github-mercury --tags
+</pre></code>
+  </li>
+</ol>
+
+<p>
 Back in the mercury repository I needed to point the boehm_gc submodule to a
 different branch,
-it was pointing to <code>mercury-7_4_pbone</code> but now that the TSX bug
-has been worked around it should point to the <code>mercury-7_4_2</code>
-branch.
-The branch is adjusted by editing .gitmodules
+Depending on which option we chose above we may need to update the branch
+name that the Mercury repository refers to.
 </p>
 
+<ol>
+  <li>
+    <p>The branch name hasn't changed</p>
+  </li>
+  <li>
+    <p>
+      The branch name was <code>release-7_4_mercury</code> and is now
+      <code>release-7_6-mercury</code>.
+      The branch is adjusted by editing .gitmodules
+    </p>
+
 <code><pre>
 $ vim .gitmodules
 </pre></code>
+  </li>
+</ol>
 
 <p>
 In any case you will need to tell git that the branches have been updated,
@@ -235,7 +322,7 @@ and these submodules should now refer to different <i>git IDs</i>.
 
 <code><pre>
 $ git submodule update --remote --checkout
-$ git add .gitmodules boehm_gc libatomic_ops
+$ git add .gitmodules boehm_gc
 $ git commit
 </pre></code>
 
-- 
2.7.4



More information about the reviews mailing list