[Git][ghc/ghc][wip/gc/shortcutting] 20 commits: Nonmoving: Allow aging and refactor static objects logic
Ben Gamari
gitlab at gitlab.haskell.org
Wed Jun 19 03:37:32 UTC 2019
Ben Gamari pushed to branch wip/gc/shortcutting at Glasgow Haskell Compiler / GHC
Commits:
88607191 by Ben Gamari at 2019-06-19T03:32:50Z
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
- - - - -
94b2eae1 by Ben Gamari at 2019-06-19T03:32:50Z
Disable aging when doing deadlock detection GC
- - - - -
3facbbd9 by Ben Gamari at 2019-06-19T03:32:51Z
More comments for aging
- - - - -
44afa56b by Ben Gamari at 2019-06-19T03:33:51Z
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.
- - - - -
93145511 by Ben Gamari at 2019-06-19T03:34:14Z
Allocate mark queues in larger block groups
- - - - -
b952914e by Ben Gamari at 2019-06-19T03:34:23Z
NonMovingMark: Optimize representation of mark queue
This shortens MarkQueueEntry by 30% (one word)
- - - - -
4fcb6e9e by Ben Gamari at 2019-06-19T03:34:23Z
NonMoving: Optimize bitmap search during allocation
Use memchr instead of a open-coded loop. This is nearly twice as fast in
a synthetic benchmark.
- - - - -
73f21d4d by Ben Gamari at 2019-06-19T03:34:23Z
rts: Add prefetch macros
- - - - -
e5fcd5c9 by Ben Gamari at 2019-06-19T03:34:23Z
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.
- - - - -
3c033190 by Ben Gamari at 2019-06-19T03:34:23Z
NonMoving: Inline nonmovingClearAllBitmaps
- - - - -
3f6009d2 by Ben Gamari at 2019-06-19T03:34:24Z
NonMoving: Fuse sweep preparation into mark prep
- - - - -
c1f16cc0 by Ben Gamari at 2019-06-19T03:34:24Z
NonMoving: Pre-fetch during mark
This improved overall runtime on nofib's constraints test by nearly 10%.
- - - - -
70d5d812 by Ben Gamari at 2019-06-19T03:34:24Z
NonMoving: Prefetch segment header
- - - - -
ddb3648b by Ben Gamari at 2019-06-19T03:34:24Z
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.
- - - - -
757621d8 by Ben Gamari at 2019-06-19T03:34:24Z
NonMovingMark: Eliminate redundant check_in_nonmoving_heaps
- - - - -
cbe2959b by Ben Gamari at 2019-06-19T03:34:24Z
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.
- - - - -
a5cd845b by Ben Gamari at 2019-06-19T03:34:24Z
Nonmoving: Ensure write barrier vanishes in non-threaded RTS
- - - - -
cb638c6b by Ben Gamari at 2019-06-19T03:34:50Z
Merge branches 'wip/gc/optimize' and 'wip/gc/test' into wip/gc/everything
- - - - -
8ab01959 by Ömer Sinan Ağacan at 2019-06-19T03:35:50Z
NonMoving: Implement indirection shortcutting
This allows indirection chains residing in the non-moving heap to be
shorted-out.
- - - - -
acd93693 by Ömer Sinan Ağacan at 2019-06-19T03:35:50Z
NonMoving: Implement selector optimisation
- - - - -
30 changed files:
- includes/Cmm.h
- includes/Rts.h
- includes/RtsAPI.h
- includes/rts/EventLogFormat.h
- includes/rts/Flags.h
- includes/rts/NonMoving.h
- libraries/base/GHC/RTS/Flags.hsc
- libraries/base/GHC/Stats.hsc
- rts/GetTime.h
- rts/Messages.c
- rts/PrimOps.cmm
- rts/RtsFlags.c
- rts/STM.c
- rts/Schedule.c
- rts/Stats.c
- rts/Stats.h
- rts/ThreadPaused.c
- rts/Threads.c
- rts/Trace.c
- rts/Trace.h
- rts/Updates.h
- rts/eventlog/EventLog.c
- rts/eventlog/EventLog.h
- rts/posix/GetTime.c
- rts/sm/Evac.c
- rts/sm/GC.c
- rts/sm/GC.h
- rts/sm/GCAux.c
- rts/sm/GCThread.h
- rts/sm/NonMoving.c
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/59c627d3c120a3a106961456a01ba914236876ca...acd93693107bdd703e992a2b04b27fdeb89df942
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/59c627d3c120a3a106961456a01ba914236876ca...acd93693107bdd703e992a2b04b27fdeb89df942
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190618/a9b10936/attachment-0001.html>
More information about the ghc-commits
mailing list