[Git][ghc/ghc][wip/gc/ben] 41 commits: Release bound tasks created for the concurrent GC

Ben Gamari gitlab at gitlab.haskell.org
Wed Apr 17 19:11:39 UTC 2019



Ben Gamari pushed to branch wip/gc/ben at Glasgow Haskell Compiler / GHC


Commits:
2121d6c6 by Ömer Sinan Ağacan at 2019-04-16T07:40:45Z
Release bound tasks created for the concurrent GC

This reduces number of tasks reported in -s output from 140 to 17. It's
still more tasks than no-xn case (4), but the number is now more
reasonable.

- - - - -
4e14501d by Ben Gamari at 2019-04-16T18:37:52Z
NonMoving.h: Fix a few signedness issues

- - - - -
ff7dabf1 by Ben Gamari at 2019-04-16T18:37:52Z
NonMoving.h: Use shift instead of integer division

- - - - -
4589bdce by Ben Gamari at 2019-04-16T18:37:53Z
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.

- - - - -
8dffa167 by Ben Gamari at 2019-04-16T18:48:15Z
Allow census without live word count

Otherwise the census is unsafe when mutators are running due to
concurrent mutation.

- - - - -
4a9b8851 by Ben Gamari at 2019-04-16T18:52:27Z
rts/Eventlog: More descriptive error message

- - - - -
61a1252b by Ben Gamari at 2019-04-16T18:58:04Z
Account for freed segments in live data estimate

- - - - -
bf2d03ea by Ben Gamari at 2019-04-16T18:58:32Z
Accounting hack

- - - - -
9bce9eb3 by Ben Gamari at 2019-04-16T18:59:17Z
Fix warning

- - - - -
01ed904c by Ben Gamari at 2019-04-16T18:59:17Z
Fix warning

- - - - -
82c8438f by Ben Gamari at 2019-04-16T18:59:17Z
Fix warning

- - - - -
8c848b7b by Ben Gamari at 2019-04-16T19:00:54Z
Add some lock contention checking

- - - - -
97bbc1b7 by Ben Gamari at 2019-04-16T19:04:02Z
Account for evacuation to nonmoving heap in copied at evacuation time

- - - - -
c161814a by Ben Gamari at 2019-04-16T19:04:06Z
Assert that n_blocks doesn't undeflow

- - - - -
d25cdf75 by Ben Gamari at 2019-04-16T19:04:09Z
Comment

- - - - -
0d2c7ca4 by Ben Gamari at 2019-04-16T19:07:52Z
NonMoving: Accumulate live words during mark

- - - - -
beb9b292 by Ben Gamari at 2019-04-16T19:07:56Z
Sanity: Don't double-count nonmoving_blocks

The blocks counted by nonmoving_blocks are already counted via
gen_blocks.

- - - - -
a672baf6 by Ben Gamari at 2019-04-16T19:35:00Z
Correctly account for mark epoch in nonmovingIsAlive

I believe that this was the cause of #15136. However, I'm still not
entirely convinced of the reasoning.

- - - - -
31806129 by Ben Gamari at 2019-04-16T19:42:26Z
XXX: Mark currently broken tests as such

- - - - -
6267400c by Ben Gamari at 2019-04-16T19:42:26Z
testsuite: Don't run conc071 in nonmoving_thr_ghc

- - - - -
1ac876a0 by Ben Gamari at 2019-04-16T19:42:26Z
ghc-heap: Skip heap_all test with debugged RTS

The debugged RTS initializes the heap with 0xaa, which breaks the
(admittedly rather fragile) assumption that uninitialized fields are set
to 0x00:
```
Wrong exit code for heap_all(nonmoving)(expected 0 , actual 1 )
Stderr ( heap_all ):
heap_all: user error (assertClosuresEq: Closures do not match
Expected: FunClosure {info = StgInfoTable {entry = Nothing, ptrs = 0, nptrs = 1, tipe = FUN_0_1, srtlen = 0, code = Nothing}, ptrArgs = [], dataArgs = [0]}
Actual:   FunClosure {info = StgInfoTable {entry = Nothing, ptrs = 0, nptrs = 1, tipe = FUN_0_1, srtlen = 1032832, code = Nothing}, ptrArgs = [], dataArgs = [12297829382473034410]}

CallStack (from HasCallStack):
  assertClosuresEq, called at heap_all.hs:230:9 in main:Main
)
```

- - - - -
3148d257 by Ben Gamari at 2019-04-16T19:42:26Z
Skip ghc_heap_all test in nonmoving ways

- - - - -
43cfd313 by Ben Gamari at 2019-04-16T19:42:26Z
Skip posix002 and executeFile001

- - - - -
10055612 by Ben Gamari at 2019-04-16T19:43:34Z
testsuite fixes

- - - - -
06faf43d by Ben Gamari at 2019-04-16T20:12:10Z
NonmovingCensus: Emit samples to eventlog

- - - - -
a7d6a8cc by Ben Gamari at 2019-04-16T20:19:11Z
Fix accounting of oldest_gen->n_blocks

There was inconsistency in the treatment of blocks in the free segment
list.

- - - - -
5b963771 by Ben Gamari at 2019-04-16T20:19:57Z
Allocate mark queues in larger block groups

- - - - -
9e8d3870 by Ben Gamari at 2019-04-16T20:20:55Z
Merge branches 'wip/gc/T15136', 'wip/gc/accounting-fixes', 'wip/gc/warning-fixes', 'wip/gc/eventlog-census', 'wip/gc/microoptimize-mark', 'wip/gc/mark-broken-tests', 'wip/gc/long-pause-diagnostics' and 'wip/gc/larger-mark-queues' into wip/gc/tmp

- - - - -
d3d20ecd by Ben Gamari at 2019-04-16T20:21:12Z
ErrUtils: Emit progress messages to eventlog

- - - - -
606535b4 by Ben Gamari at 2019-04-16T20:21:12Z
Emit GHC timing events to eventlog

- - - - -
ddf2c136 by Ben Gamari at 2019-04-16T20:21:12Z
XXX: Various tracing

- - - - -
ec8504f4 by Ben Gamari at 2019-04-16T20:21:12Z
Tracing

- - - - -
36e36baa by Ben Gamari at 2019-04-16T20:21:12Z
Introduce MUTLIST_DEBUG

- - - - -
21169e33 by Ben Gamari at 2019-04-16T20:21:12Z
Block counting functions for nonmoving heap

Probably won't need these

- - - - -
883fcef8 by Ben Gamari at 2019-04-16T20:21:12Z
Drop redundant assignment

- - - - -
894313e3 by Ben Gamari at 2019-04-16T20:21:12Z
XXX: Emit nonmoving census during GC

- - - - -
a01753bb by Ben Gamari at 2019-04-16T20:21:12Z
XXX

- - - - -
a53f1be5 by Ben Gamari at 2019-04-16T20:21:12Z
XXX

- - - - -
e86fad52 by Ben Gamari at 2019-04-16T20:26:25Z
Fix ErrUtils

- - - - -
9659fe91 by Ben Gamari at 2019-04-17T17:55:22Z
Eventlog: Fix warning

- - - - -
45662404 by Ben Gamari at 2019-04-17T17:56:11Z
Fix accounting for real

- - - - -


30 changed files:

- .gitlab-ci.yml
- compiler/main/ErrUtils.hs
- includes/rts/EventLogFormat.h
- includes/rts/Flags.h
- includes/rts/OSThreads.h
- libraries/base/GHC/RTS/Flags.hsc
- libraries/base/tests/all.T
- libraries/ghc-compact/tests/all.T
- libraries/ghc-heap/tests/all.T
- + rts/LongPause.c
- + rts/LongPause.h
- rts/RtsFlags.c
- rts/Schedule.c
- rts/StableName.c
- rts/StablePtr.c
- rts/StaticPtrTable.c
- rts/Threads.c
- rts/Trace.c
- rts/Trace.h
- rts/eventlog/EventLog.c
- rts/eventlog/EventLog.h
- rts/rts.cabal.in
- rts/sm/Evac.c
- rts/sm/GC.c
- rts/sm/GC.h
- rts/sm/NonMoving.c
- rts/sm/NonMoving.h
- rts/sm/NonMovingCensus.c
- rts/sm/NonMovingCensus.h
- rts/sm/NonMovingMark.c


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/5f773235f2b966e612743baea747fa6f0fc420d1...45662404780b4968b5308ad969e233ffeb175c9a

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/5f773235f2b966e612743baea747fa6f0fc420d1...45662404780b4968b5308ad969e233ffeb175c9a
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/20190417/35393896/attachment-0001.html>


More information about the ghc-commits mailing list