[Git][ghc/ghc][wip/T22264] 41 commits: rts: Drop redundant prototype
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Wed Mar 8 00:59:05 UTC 2023
Ben Gamari pushed to branch wip/T22264 at Glasgow Haskell Compiler / GHC
Commits:
aa338394 by Ben Gamari at 2023-03-07T19:52:57-05:00
rts: Drop redundant prototype
- - - - -
1ca730ce by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Fix style
- - - - -
1cc4bd7a by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Deduplicate assertion
- - - - -
8623ab4b by Ben Gamari at 2023-03-07T19:53:06-05:00
rts: Fix type issues in Sparks.h
Adds explicit casts to satisfy a C++ compiler.
- - - - -
e04ad017 by Ben Gamari at 2023-03-07T19:53:06-05:00
rts: Use release ordering when storing thread labels
Since this makes the ByteArray# visible from other cores.
- - - - -
3072bef5 by Ben Gamari at 2023-03-07T19:53:06-05:00
rts/BlockAlloc: Allow disabling of internal assertions
These can be quite expensive and it is sometimes useful to compile a
DEBUG RTS without them.
- - - - -
3223048a by Ben Gamari at 2023-03-07T19:53:06-05:00
rts/Sanity: Mark pinned_object_blocks
- - - - -
ce4cf9d5 by Ben Gamari at 2023-03-07T19:53:06-05:00
rts/Sanity: Look at nonmoving saved_filled lists
- - - - -
9ce9fba4 by Ben Gamari at 2023-03-07T19:53:06-05:00
Evac: Squash data race in eval_selector_chain
- - - - -
ba3c7b67 by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Clarify implementation
This makes the intent of this implementation a bit clearer.
- - - - -
883d00f9 by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Clarify comment
- - - - -
ed5443ec by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Add missing no-op in busy-wait loop
- - - - -
244640a0 by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Don't push empty arrays to update remembered set
Previously the write barrier of resizeSmallArray# incorrectly handled
resizing of zero-sized arrays, pushing an invalid pointer to the update
remembered set.
Fixes #22931.
- - - - -
683e0c7a by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Fix handling of weak pointers
This fixes an interaction between aging and weak pointer handling which
prevented the finalization of some weak pointers. In particular, weak
pointers could have their keys incorrectly marked by the preparatory
collector, preventing their finalization by the subsequent concurrent
collection.
While in the area, we also significantly improve the assertions
regarding weak pointers.
Fixes #22327.
- - - - -
90e24004 by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Sanity check nonmoving large objects and compacts
- - - - -
2f082657 by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Sanity check mutable list
Assert that entries in the nonmoving generation's generational
remembered set (a.k.a. mutable list) live in nonmoving generation.
- - - - -
3288e96d by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Don't show occupancy if we didn't collect live words
- - - - -
4392965d by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Fix tracking of FILLED_SWEEPING segments
Previously we only updated the state of the segment at the head of each
allocator's filled list.
- - - - -
d478ac18 by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Assert state of swept segments
- - - - -
3e47be78 by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Handle new closures in nonmovingIsNowAlive
We must conservatively assume that new closures are reachable since we
are not guaranteed to mark such blocks.
- - - - -
7dc1679b by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Don't clobber update rem sets of old capabilities
Previously `storageAddCapabilities` (called by `setNumCapabilities`) would
clobber the update remembered sets of existing capabilities when
increasing the capability count. Fix this by only initializing the
update remembered sets of the newly-created capabilities.
Fixes #22927.
- - - - -
bd80fcd1 by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Add missing write barriers in selector optimisation
This fixes the selector optimisation, adding a few write barriers which
are necessary for soundness. See the inline comments for details.
Fixes #22930.
- - - - -
e941801a by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Post-sweep sanity checking
- - - - -
68fa47f3 by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Avoid n_caps race
- - - - -
b15c8137 by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Don't push if nonmoving collector isn't enabled
- - - - -
ca3bc402 by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Be more paranoid in segment tracking
Previously we left various segment link pointers dangling. None of this
wrong per se, but it did make it harder than necessary to debug.
- - - - -
02399888 by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Sync-phase mark budgeting
Here we significantly improve the bound on sync phase pause times by
imposing a limit on the amount of work that we can perform during the
sync. If we find that we have exceeded our marking budget then we allow
the mutators to resume, return to concurrent marking, and try
synchronizing again later.
Fixes #22929.
- - - - -
0c6f1576 by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Allow pinned gen0 objects to be WEAK keys
- - - - -
5b60acba by Ben Gamari at 2023-03-07T19:53:06-05:00
rts: Reenable assertion
- - - - -
f8493745 by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Move current segment array into Capability
The current segments are conceptually owned by the mutator, not the
collector. Consequently, it was quite tricky to prove that the mutator
would not race with the collect due to this shared state. It turns out
that such races are possible: when resizing the current segment array
we may concurrently try to take a heap census. This will attempt to walk
the current segment array, causing a data race.
Fix this by moving the current segment array into `Capability`, where it
belongs.
Fixes #22926.
- - - - -
43fda648 by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Fix Note references
Some references to Note [Deadlock detection under the non-moving
collector] were missing an article.
- - - - -
a9062eaa by Ben Gamari at 2023-03-07T19:53:06-05:00
rts/Sanity: Fix block count assertion with non-moving collector
The nonmoving collector does not use `oldest_gen->blocks` to track its
block list. However, it nevertheless updates `oldest_gen->n_blocks` to
ensure that its size is accounted for by the storage manager.
Consequently, we must not attempt to assert consistency between the two.
- - - - -
b284e1c1 by Ben Gamari at 2023-03-07T19:53:06-05:00
nonmoving: Don't call prepareUnloadCheck
When the nonmoving GC is in use we do not call `checkUnload` (since we
don't unload code) and therefore should not call `prepareUnloadCheck`,
lest we run into assertions.
- - - - -
9c9899d5 by Ben Gamari at 2023-03-07T19:53:07-05:00
rts: Encapsulate block allocator spinlock
This makes it a bit easier to add instrumentation on this spinlock
while debugging.
- - - - -
5e5c3032 by Ben Gamari at 2023-03-07T19:53:07-05:00
testsuite: Skip some tests when sanity checking is enabled
- - - - -
f2ef2f5e by Ben Gamari at 2023-03-07T19:53:07-05:00
nonmoving: Fix unregisterised build
- - - - -
7cc7461c by Ben Gamari at 2023-03-07T19:53:07-05:00
nonmoving: Ensure that sanity checker accounts for saved_filled segments
- - - - -
ec382ccc by Ben Gamari at 2023-03-07T19:53:07-05:00
hadrian: Add +boot_nonmoving_gc flavour transformer
For using GHC bootstrapping to validate the non-moving GC.
- - - - -
f27f75f5 by Ben Gamari at 2023-03-07T19:53:07-05:00
gitlab-ci: Add job bootstrapping with nonmoving GC
- - - - -
e6f7b809 by Ben Gamari at 2023-03-07T19:53:07-05:00
nonmoving: Move allocator into new source file
- - - - -
cfc68b5c by Ben Gamari at 2023-03-07T19:53:07-05:00
nonmoving: Split out nonmovingAllocateGC
- - - - -
30 changed files:
- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- hadrian/src/Flavour.hs
- libraries/ghc-heap/tests/all.T
- rts/Capability.c
- rts/Capability.h
- rts/PrimOps.cmm
- rts/RtsStartup.c
- rts/RtsUtils.h
- rts/Schedule.c
- rts/Sparks.h
- rts/ThreadLabels.c
- rts/include/rts/storage/MBlock.h
- rts/rts.cabal.in
- rts/sm/BlockAlloc.c
- rts/sm/Evac.c
- rts/sm/GC.c
- rts/sm/GC.h
- rts/sm/GCUtils.c
- rts/sm/GCUtils.h
- rts/sm/HeapAlloc.h
- rts/sm/MarkWeak.c
- rts/sm/NonMoving.c
- rts/sm/NonMoving.h
- + rts/sm/NonMovingAllocate.c
- + rts/sm/NonMovingAllocate.h
- rts/sm/NonMovingCensus.c
- rts/sm/NonMovingCensus.h
- rts/sm/NonMovingMark.c
- rts/sm/NonMovingMark.h
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/637a2b5e8d768c4db99ad1fb0f40290da093ea20...cfc68b5c9ee9000010ccb2b7f1d346542df3b79f
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/637a2b5e8d768c4db99ad1fb0f40290da093ea20...cfc68b5c9ee9000010ccb2b7f1d346542df3b79f
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/20230307/2e35ca5d/attachment-0001.html>
More information about the ghc-commits
mailing list