<!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/gc/everything2
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/88607191d0b99df6a0ee7e226939d5f2706cb48e">88607191</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:32:50Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Nonmoving: Allow aging and refactor static objects logic

This commit does two things:

 * Allow aging of objects during the preparatory minor GC
 * Refactor handling of static objects to avoid the use of a hashtable
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/94b2eae14fb913773bf53ba5247b37aa39912208">94b2eae1</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:32:50Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Disable aging when doing deadlock detection GC
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/3facbbd96ef23d70e659fc84f4745ed1b2d21d6e">3facbbd9</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:32:51Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">More comments for aging
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/44afa56b9b7f91bbe6280151427415717a875299">44afa56b</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:33:51Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NonMoving: Eliminate integer division in nonmovingBlockCount

Perf showed that the this single div was capturing up to 10% of samples
in nonmovingMark. However, the overwhelming majority of cases is looking
at small block sizes. These cases we can easily compute explicitly,
allowing the compiler to turn the division into a significantly more
efficient division-by-constant.

While the increase in source code looks scary, this all optimises down
to very nice looking assembler. At this point the only remaining
hotspots in nonmovingBlockCount are due to memory access.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/93145511e7831149a5f1a122f1c4b5d63792f24e">93145511</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:34:14Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Allocate mark queues in larger block groups
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/b952914e8424eb40a52510686bb41b4dc4c89346">b952914e</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:34:23Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NonMovingMark: Optimize representation of mark queue

This shortens MarkQueueEntry by 30% (one word)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/4fcb6e9e09addd3e2774721d60b726cf04df6fde">4fcb6e9e</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:34:23Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NonMoving: Optimize bitmap search during allocation

Use memchr instead of a open-coded loop. This is nearly twice as fast in
a synthetic benchmark.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/73f21d4d264712c21876695e9b7ee5cf1a040efa">73f21d4d</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:34:23Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Add prefetch macros
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/e5fcd5c99a8ad209f64e688cb6ec4760c256b4a8">e5fcd5c9</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:34:23Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NonMoving: Prefetch when clearing bitmaps

Ensure that the bitmap of the segmentt that we will clear next is in
cache by the time we reach it.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/3c03319069e3401f1642407914402a8afe97c523">3c033190</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:34:23Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NonMoving: Inline nonmovingClearAllBitmaps
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/3f6009d23755866f56bb17dc892cb94a8fd530fc">3f6009d2</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:34:24Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NonMoving: Fuse sweep preparation into mark prep
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/c1f16cc051038cfa35bf39364feb1a73562875f2">c1f16cc0</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:34:24Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NonMoving: Pre-fetch during mark

This improved overall runtime on nofib's constraints test by nearly 10%.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/70d5d812f0ac193e561d26c61135cc438090fcf2">70d5d812</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:34:24Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NonMoving: Prefetch segment header
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/ddb3648b95487b6bb452a6ef9531ed83749a194c">ddb3648b</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:34:24Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NonMoving: Optimise allocator cache behavior

Previously we would look at the segment header to determine the block
size despite the fact that we already had the block size at hand.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/757621d85b414678ab4bbcea475aa725d44e8598">757621d8</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:34:24Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NonMovingMark: Eliminate redundant check_in_nonmoving_heaps
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/cbe2959bbcb7daddb94107cb731b1c4de9647574">cbe2959b</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:34:24Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NonMoving: Don't do major GC if one is already running

Previously we would perform a preparatory moving collection, resulting
in many things being added to the mark queue. When we finished with this
we would realize in nonmovingCollect that there was already a collection
running, in which case we would simply not run the nonmoving collector.

However, it was very easy to end up in a "treadmilling" situation: all
subsequent GC following the first failed major GC would be scheduled as
major GCs. Consequently we would continuously feed the concurrent
collector with more mark queue entries and it would never finish.

This patch aborts the major collection far earlier, meaning that we
avoid adding nonmoving objects to the mark queue and allowing the
concurrent collector to finish.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/a5cd845b0e7aaa67ef7321846e07bdfc4e266206">a5cd845b</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:34:24Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Nonmoving: Ensure write barrier vanishes in non-threaded RTS
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/cb638c6b08573fa74faf836283c1daacca031551">cb638c6b</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:34:50Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Merge branches 'wip/gc/optimize' and 'wip/gc/test' into wip/gc/everything
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/8ab019595bb19747057074d8ca649b83848fb638">8ab01959</a></strong>
<div>
<span>by Ömer Sinan Ağacan</span>
<i>at 2019-06-19T03:35:50Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NonMoving: Implement indirection shortcutting

This allows indirection chains residing in the non-moving heap to be
shorted-out.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/acd93693107bdd703e992a2b04b27fdeb89df942">acd93693</a></strong>
<div>
<span>by Ömer Sinan Ağacan</span>
<i>at 2019-06-19T03:35:50Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NonMoving: Implement selector optimisation
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/90323cd53cca9754a51795c3ae98f515aa2a4923">90323cd5</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:35:58Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NonMoving: Introduce nonmovingSegmentLogBlockSize acccessor

This will allow us to easily move the block size elsewhere.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/4d914481f37932dd71cbc52afbb68cb261ab84a8">4d914481</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:35:58Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NonMoving: Move block size to block descriptor
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/9fad881cba5056728ca422472d56f24c96700608">9fad881c</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:35:58Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NonMoving: Move next_free_snap to block descriptor
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/cb37ea54d749cb3e638a76db61ba5b91860735ca">cb37ea54</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:36:05Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NonMoving: Add summarizing Note
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/d1311609a4f43f5796be4d0f9e349f9a6ffd445e">d1311609</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:36:05Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">NonMoving: More comments
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/commit/7a9165616be8341c36a4a9515f2f9ea56cb89c06">7a916561</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2019-06-19T03:36:36Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Merge branches 'wip/gc/segment-header-to-bdescr' and 'wip/gc/docs' into wip/gc/everything2
</pre>
</li>
</ul>
<h4>30 changed files:</h4>
<ul>
<li class="file-stats">
<a href="#6011cad13b19136953f8ee72df01a66623c5c1b0">
includes/Cmm.h
</a>
</li>
<li class="file-stats">
<a href="#40f83a2cddcbc1f8190b0551eb572ccf4ea88cc9">
includes/Rts.h
</a>
</li>
<li class="file-stats">
<a href="#f7bfc5e15e7497f29b41f6df46865c151a07955d">
includes/RtsAPI.h
</a>
</li>
<li class="file-stats">
<a href="#debe527847514360ea5e75538c7630ba2dfebba6">
includes/rts/EventLogFormat.h
</a>
</li>
<li class="file-stats">
<a href="#241971342cd0c394b24e67a781cf7e3d2f01aa72">
includes/rts/Flags.h
</a>
</li>
<li class="file-stats">
<a href="#3b4c67d255fe638e594c28d4a73d04aee85a04f0">
includes/rts/NonMoving.h
</a>
</li>
<li class="file-stats">
<a href="#0dcc7b3b05fd9aac5ea350885b06f0718bcf70c2">
includes/rts/storage/Block.h
</a>
</li>
<li class="file-stats">
<a href="#2f870b7c76a5e24010e464cc1a1f860c0f9e0dab">
includes/rts/storage/TSO.h
</a>
</li>
<li class="file-stats">
<a href="#c184941110ec11e4f595256c2354bed617511571">
libraries/base/GHC/RTS/Flags.hsc
</a>
</li>
<li class="file-stats">
<a href="#023c46971c621e339912811040e9c049ece01475">
libraries/base/GHC/Stats.hsc
</a>
</li>
<li class="file-stats">
<a href="#ab886ab520e51dbacc9947d1586d5257a6037f77">
rts/GetTime.h
</a>
</li>
<li class="file-stats">
<a href="#63bb2dcb45bf7982130b0b95ecf366bf1a617e82">
rts/Messages.c
</a>
</li>
<li class="file-stats">
<a href="#6db965f97cbab901f493506a385bcf1283009921">
rts/PrimOps.cmm
</a>
</li>
<li class="file-stats">
<a href="#640fc6f2f536ba83f1694f9a7ef3d43e2d0428d3">
rts/RtsFlags.c
</a>
</li>
<li class="file-stats">
<a href="#e137645f8a9be9fa32cc764e19cea2b492e33d9c">
rts/STM.c
</a>
</li>
<li class="file-stats">
<a href="#7d6961cb073b9fe3df3a81f0ad5cf36eed293c42">
rts/Schedule.c
</a>
</li>
<li class="file-stats">
<a href="#6c6e266b51f1c94d2ebf5aa2052f408397451f94">
rts/Stats.c
</a>
</li>
<li class="file-stats">
<a href="#b90c7236dd80d0ab7be1156ccd798e69994e38c6">
rts/Stats.h
</a>
</li>
<li class="file-stats">
<a href="#4b22b3f666af23f7c8097b32282abfd52fb6c342">
rts/ThreadPaused.c
</a>
</li>
<li class="file-stats">
<a href="#a5d219117032120cc7bde9f13451d9627cff5614">
rts/Threads.c
</a>
</li>
<li class="file-stats">
<a href="#050d739b5c42d009648d099fb66bae809e83482e">
rts/Trace.c
</a>
</li>
<li class="file-stats">
<a href="#af7520a7c19cb7a894a90a944c97a4ed95f12b78">
rts/Trace.h
</a>
</li>
<li class="file-stats">
<a href="#2ffbdc61d9d0e36978f07f62c00c08f33149e335">
rts/Updates.h
</a>
</li>
<li class="file-stats">
<a href="#4bef7d0c5d4ce46744aaacac2800349746d7e44f">
rts/eventlog/EventLog.c
</a>
</li>
<li class="file-stats">
<a href="#76aeecda0541f8b07341c3e7947c02a0cae5b8af">
rts/eventlog/EventLog.h
</a>
</li>
<li class="file-stats">
<a href="#8d4f2f35ca75df36e543dd637c726b7578faf8be">
rts/posix/GetTime.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="#06e70a7de800b2de9d75c2d5b5b554929f6b9bcb">
rts/sm/GC.h
</a>
</li>
<li class="file-stats">
<a href="#a481abfdf0106c53321542436ad78f6df542b1b8">
rts/sm/GCAux.c
</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/8c13a6ecccf7b40221c5910f47c6cc349434b4b5...7a9165616be8341c36a4a9515f2f9ea56cb89c06">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>