<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>



<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">

<h3>
Ben Gamari pushed to branch wip/unloading
at <a href="https://gitlab.haskell.org/ghc/ghc">Glasgow Haskell Compiler / GHC</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/0d422cd5b9db862236eef089e360a411ef8f6f23">0d422cd5</a></strong>
<div>
<span>by Ömer Sinan Ağacan</span>
<i>at 2020-10-22T17:15:19+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Fix and enable object unloading in GHCi

Fixes #16525

See Note [Object unloading] in CheckUnload.c for details.

NoFib results:

--------------------------------------------------------------------------------
        Program           Size    Allocs    Instrs     Reads    Writes
--------------------------------------------------------------------------------
             CS          -0.2%      0.0%     +0.0%     +0.0%     +0.0%
            CSD          -0.2%      0.0%     +0.0%     +0.0%     +0.0%
             FS          -0.2%      0.0%     +0.0%     +0.0%     -0.0%
              S          -0.2%      0.0%     +1.0%     +1.1%     +0.0%
             VS          -0.2%      0.0%     +0.0%     +0.0%     -0.0%
            VSD          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
            VSM          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
           anna          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
           ansi          -0.1%      0.0%     +0.0%     +0.0%      0.0%
           atom          -0.1%      0.0%     +0.0%     +0.0%      0.0%
         awards          -0.1%      0.0%     +0.0%     +0.0%      0.0%
         banner          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
     bernouilli          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
   binary-trees          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
          boyer          -0.1%      0.0%     +0.1%     +0.1%      0.0%
         boyer2          -0.1%      0.0%     +0.0%     +0.1%      0.0%
           bspt          -0.1%      0.0%     +0.0%     +0.0%      0.0%
      cacheprof          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
       calendar          -0.1%      0.0%     +0.0%     +0.0%      0.0%
       cichelli          -0.1%      0.0%     +0.1%     +0.2%     +0.0%
        circsim          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
       clausify          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
  comp_lab_zift          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
       compress          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
      compress2          -0.1%      0.0%     +0.0%     +0.0%      0.0%
    constraints          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
   cryptarithm1          -0.1%      0.0%     +0.0%     +0.0%      0.0%
   cryptarithm2          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
            cse          -0.1%      0.0%     +0.0%     +0.0%      0.0%
   digits-of-e1          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
   digits-of-e2          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
         dom-lt          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
          eliza          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
          event          -0.1%      0.0%     +0.0%     +0.1%      0.0%
    exact-reals          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
         exp3_8          -0.1%      0.0%     +0.0%     +0.0%      0.0%
         expert          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
 fannkuch-redux          -0.1%      0.0%     +0.0%     +0.0%      0.0%
          fasta          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
            fem          -0.1%      0.0%     +0.0%     +0.0%      0.0%
            fft          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
           fft2          -0.1%      0.0%     +0.0%     +0.0%      0.0%
       fibheaps          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
           fish          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
          fluid          -0.1%      0.0%     +0.1%     +0.1%     -0.0%
         fulsom          -0.1%      0.0%     +0.0%     +0.0%      0.0%
         gamteb          -0.1%      0.0%     +0.0%     +0.0%      0.0%
            gcd          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
    gen_regexps          -0.2%      0.0%     +0.0%     +0.0%     -0.0%
         genfft          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
             gg          -0.1%      0.0%     +0.1%     +0.1%      0.0%
           grep          -0.1%      0.0%     +0.0%     +0.0%      0.0%
         hidden          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
            hpg          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
            ida          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
          infer          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
        integer          -0.1%      0.0%     +0.0%     +0.0%      0.0%
      integrate          -0.1%      0.0%     +0.0%     +0.0%      0.0%
   k-nucleotide          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
          kahan          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
        knights          -0.1%      0.0%     +0.0%     +0.0%      0.0%
         lambda          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
     last-piece          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
           lcss          -0.1%      0.0%     +0.0%     +0.0%      0.0%
           life          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
           lift          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
         linear          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
      listcompr          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
       listcopy          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
       maillist          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
         mandel          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
        mandel2          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
           mate          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
        minimax          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
        mkhprog          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
     multiplier          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
         n-body          -0.1%      0.0%     +0.0%     +0.0%      0.0%
       nucleic2          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
           para          -0.1%      0.0%     +0.0%     +0.0%      0.0%
      paraffins          -0.1%      0.0%     +0.0%     +0.0%      0.0%
         parser          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
        parstof          -0.1%      0.0%     +0.2%     +0.2%     -0.0%
            pic          -0.1%      0.0%     +0.1%     +0.1%     +0.0%
       pidigits          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
          power          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
         pretty          -0.1%      0.0%     +0.5%     +0.6%     -0.0%
         primes          -0.1%      0.0%     +0.0%     +0.0%      0.0%
      primetest          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
         prolog          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
         puzzle          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
         queens          -0.1%      0.0%     +0.0%     +0.0%      0.0%
        reptile          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
reverse-complem          -0.2%      0.0%     +0.0%     +0.0%      0.0%
        rewrite          -0.1%      0.0%     +0.0%     +0.0%      0.0%
           rfib          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
            rsa          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
            scc          -0.2%      0.0%     +0.5%     +0.7%     +0.0%
          sched          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
            scs          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
         simple          -0.1%      0.0%     +0.3%     +0.4%      0.0%
          solid          -0.1%      0.0%     +0.0%     +0.0%      0.0%
        sorting          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
  spectral-norm          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
         sphere          -0.1%      0.0%     +0.0%     +0.0%      0.0%
         symalg          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
            tak          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
      transform          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
       treejoin          -0.1%      0.0%     +0.1%     +0.1%      0.0%
      typecheck          -0.1%      0.0%     +0.0%     +0.0%      0.0%
        veritas          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
           wang          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
      wave4main          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
   wheel-sieve1          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
   wheel-sieve2          -0.1%      0.0%     +0.0%     +0.0%     -0.0%
           x2n1          -0.1%      0.0%     +0.0%     +0.0%     +0.0%
--------------------------------------------------------------------------------
            Min          -0.2%      0.0%     +0.0%     +0.0%     -0.0%
            Max          -0.1%      0.0%     +1.0%     +1.1%     +0.0%
 Geometric Mean          -0.1%     -0.0%     +0.0%     +0.0%     -0.0%
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/35547f8e4235b985f1ffb8b176348ee2aef116a3">35547f8e</a></strong>
<div>
<span>by Ray Shih</span>
<i>at 2020-10-22T17:15:19+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Add loadNativeObj and unloadNativeObj

(This change is originally written by niteria)

This adds two functions:
* `loadNativeObj`
* `unloadNativeObj`
and implements them for Linux.

They are useful if you want to load a shared object with Haskell code
using the system linker and have GHC call dlclose() after the
code is no longer referenced from the heap.

Using the system linker allows you to load the shared object
above outside the low-mem region. It also loads the DWARF sections
in a way that `perf` understands.

`dl_iterate_phdr` is what makes this implementation Linux specific.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/852129d33b4291e2db8c4e0ea399f2896eb3befb">852129d3</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-10-22T17:21:23+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Introduce highMemDynamic
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/6f5e9883ed189a7c4890dcf7a9661d810e1b0867">6f5e9883</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-10-22T17:21:40+00:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Introduce test for dynamic library unloading

This uses the highMemDynamic flag introduced earlier to verify that
dynamic objects are properly unloaded.
</pre>
</li>
</ul>
<h4>30 changed files:</h4>
<ul>
<li class="file-stats">
<a href="#3556223cd3ef45d787321b5290bf33535a361873">
compiler/GHC/Runtime/Linker.hs
</a>
</li>
<li class="file-stats">
<a href="#ae6b27fda1cc1591738c66625518d3472c48163f">
includes/rts/Linker.h
</a>
</li>
<li class="file-stats">
<a href="#94ca41c5afbb3d932bd6f37ee16458322988fb69">
includes/rts/storage/GC.h
</a>
</li>
<li class="file-stats">
<a href="#ba1d62598dfbf5ddb817dd9c93461a02a0bba43d">
rts/CheckUnload.c
</a>
</li>
<li class="file-stats">
<a href="#67cc28da78ad5c427434fbe2efdcecffe61ae002">
rts/CheckUnload.h
</a>
</li>
<li class="file-stats">
<a href="#152b85a9ce66dcf385a199eab2acad9d98fd737b">
rts/Hash.c
</a>
</li>
<li class="file-stats">
<a href="#4352fec095ae082617e59e2f077ec6dc9e865ee7">
rts/Hash.h
</a>
</li>
<li class="file-stats">
<a href="#044fe9284335a9bfd17546e06c2e5c40a680dd3d">
rts/Linker.c
</a>
</li>
<li class="file-stats">
<a href="#687f0b17315e54a1692de64626391e572ca298e9">
rts/LinkerInternals.h
</a>
</li>
<li class="file-stats">
<a href="#9ed11d0519762dae04656481b089dbb5b05acf98">
rts/RtsStartup.c
</a>
</li>
<li class="file-stats">
<a href="#b7ec52d5e302083ed03503182f1293694dda24f3">
rts/linker/Elf.c
</a>
</li>
<li class="file-stats">
<a href="#c13531a3a86ee59ab6d8d4bd01fbea1ad9646bdb">
rts/linker/LoadArchive.c
</a>
</li>
<li class="file-stats">
<a href="#f4db9593d88d3c951505379e54f3db74f49ae142">
rts/linker/MachO.c
</a>
</li>
<li class="file-stats">
<a href="#9670354b74fe55079feca82e1510129734b46f4f">
rts/linker/PEi386.c
</a>
</li>
<li class="file-stats">
<a href="#1fbdc15fb59db29e00c07dc7dac3b36492baaa1c">
rts/linker/elf_got.c
</a>
</li>
<li class="file-stats">
<a href="#37a93df244a7789fddf557443b6398d06763e9cc">
rts/sm/Evac.c
</a>
</li>
<li class="file-stats">
<a href="#6477e10756faf038741e63d1ad499a1df809fe10">
rts/sm/GC.c
</a>
</li>
<li class="file-stats">
<a href="#0bfe9d4217bccddd6b00d2d6a5e56e7de4c86273">
rts/sm/Storage.c
</a>
</li>
<li class="file-stats">
<a href="#26627baa966cfbb2801731d80e40d9793c23ab55">
testsuite/tests/ghci/T16525a/T16525a.script
</a>
</li>
<li class="file-stats">
<a href="#8f8e60113be652bd8dad559787917715363a6f6f">
testsuite/tests/ghci/T16525a/T16525a.stdout
</a>
</li>
<li class="file-stats">
<a href="#c198785d7f916bc321dc6d4f89114348bbf64d53">
testsuite/tests/ghci/T16525a/all.T
</a>
</li>
<li class="file-stats">
<a href="#2d8799bf001d0147f8d062a8f2ad48f8334e3843">
<span class="new-file">
+
testsuite/tests/ghci/T16525b/A.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#96e22c48586ff706ca32dfe75bb438fe4ebbd1e3">
<span class="new-file">
+
testsuite/tests/ghci/T16525b/B.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#cb22804bd773bfb0dff10b71f69663d0440ed1f2">
<span class="new-file">
+
testsuite/tests/ghci/T16525b/T16525b.script
</span>
</a>
</li>
<li class="file-stats">
<a href="#f94f3625fe09a9916921fbbd89430a2be0c49b61">
<span class="new-file">
+
testsuite/tests/ghci/T16525b/T16525b.stdout
</span>
</a>
</li>
<li class="file-stats">
<a href="#791d3b44264b8b784921ed1f08ba4706cf1d53c4">
<span class="new-file">
+
testsuite/tests/ghci/T16525b/all.T
</span>
</a>
</li>
<li class="file-stats">
<a href="#1544b39dc7466b4062c0515c8363c8b0f57b7a3c">
testsuite/tests/rts/linker/Makefile
</a>
</li>
<li class="file-stats">
<a href="#2b81e3889541a0e40c43862ab1d435c3cbcc15d6">
testsuite/tests/rts/linker/all.T
</a>
</li>
<li class="file-stats">
<a href="#bbe37bd969beb1a821970fb0851e5cbea0547ae8">
testsuite/tests/rts/linker/linker_error.c
</a>
</li>
<li class="file-stats">
<a href="#ed9f72170c50f5c134da7e76d5f22944939d69aa">
<span class="new-file">
+
testsuite/tests/rts/linker/linker_unload_native.c
</span>
</a>
</li>
</ul>
<h5>The diff was not included because it is too large.</h5>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777;">

<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/compare/1549b05fce98ed3aeac459bdbdb150b67ccfbb4c...6f5e9883ed189a7c4890dcf7a9661d810e1b0867">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.haskell.org.
If you'd like to receive fewer emails, you can
adjust your notification settings.



</p>
</div>
</body>
</html>