[Git][ghc/ghc][wip/T22264-9.2] 19 commits: Allow stat increases for GHC 9.2
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Tue Feb 7 14:02:29 UTC 2023
Ben Gamari pushed to branch wip/T22264-9.2 at Glasgow Haskell Compiler / GHC
Commits:
51138891 by Zubin Duggal at 2023-02-06T19:20:23-05:00
Allow stat increases for GHC 9.2
Metric Increase:
T13701
T14697
- - - - -
bf806f27 by Ben Gamari at 2023-02-06T19:35:43-05:00
rts: Introduce getNumCapabilities
And ensure accesses to n_capabilities are atomic (although with relaxed
ordering). This is necessary as RTS API callers may concurrently call
into the RTS without holding a capability.
(cherry picked from commit 70999283156f527c5aea6dee57a3d14989a9903a)
- - - - -
4579f239 by Ben Gamari at 2023-02-06T19:35:43-05:00
nonmoving: Don't show occupancy if we didn't collect live words
(cherry picked from commit fcd9794163f6ae7af8783676ee79e0b8e78167ba)
- - - - -
4e1cdb3b by Ben Gamari at 2023-02-06T19:57:03-05:00
nonmoving: Refactor update remembered set initialization
This avoids a lock inversion between the storage manager mutex and
the stable pointer table mutex by not dropping the SM_MUTEX in
nonmovingCollect. This requires quite a bit of rejiggering but it
does seem like a better strategy.
(cherry picked from commit 543cae0084a72ca767a443d857f9e65a5a79f71d)
- - - - -
4e07623e by Ben Gamari at 2023-02-06T19:57:06-05:00
nonmoving: Fix style
(cherry picked from commit b642ef1dc4cbe19c3479b2c014e7d1f7959f8e4a)
- - - - -
46b28d57 by Ben Gamari at 2023-02-06T19:57: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.
Likely fixes the cause of #22264.
(cherry picked from commit f8988a9c53ae73ff5b9c6008f467a7171e99c61f)
- - - - -
af8632a4 by Ben Gamari at 2023-02-06T20:16:41-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.
(cherry picked from commit a999f7b5b4b7316c088d7233a452fb33dc17646f)
- - - - -
00628207 by Ben Gamari at 2023-02-06T20:16:43-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.
(cherry picked from commit 48b89dba91640fa977d038ea5283019c73f1b18e)
- - - - -
8c953295 by Ben Gamari at 2023-02-06T20:16:43-05:00
nonmoving: Handle new closures in nonmovingIsNowAlive
(cherry picked from commit 36ca160d0f199a688cf5fbc91d4bb92d2d4ea14e)
- - - - -
19019c9d by Ben Gamari at 2023-02-06T20:16:43-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.
(cherry picked from commit 8b64aff0fa978c762dfae8df235dd2b2a340656a)
- - - - -
2d1c56ba by Ben Gamari at 2023-02-06T20:16:43-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.
(cherry picked from commit dde67d6e32ecff0e400f98213d42ae790babac09)
- - - - -
0d308632 by Ben Gamari at 2023-02-06T20:16:43-05:00
nonmoving: Don't push if nonmoving collector isn't enabled
(cherry picked from commit 8adc1750c02e596b4014d2837b4eb3d76bd130f2)
- - - - -
37c514cb by Ben Gamari at 2023-02-06T20:16:43-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.
(cherry picked from commit c620669651c52fd228af61040747dd7236c4ba2b)
- - - - -
a6eb1cca by Ben Gamari at 2023-02-06T20:16:43-05:00
nonmoving: Allow pinned gen0 objects to be WEAK keys
(cherry picked from commit 3887132fcd20f0a1edfc9f7006bdbed2634e2a8d)
- - - - -
e765db6e by Ben Gamari at 2023-02-06T20:16:43-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.
(cherry picked from commit cc75031b4d93d4565e0428cb5910d9b9a645485b)
- - - - -
a877b0e0 by Ben Gamari at 2023-02-06T20:16:43-05:00
nonmoving: Add missing no-op in busy-wait loop
(cherry picked from commit 9f931a8801c84b8ae473f91349e144eebc73b415)
- - - - -
b8a8614c by Ben Gamari at 2023-02-06T20:18:47-05:00
nonmoving: Move current segment array into Capability
(cherry picked from commit 9d245c1baec91ee79d715062b127e487456d9c9e)
- - - - -
b5a78549 by Ben Gamari at 2023-02-06T20:18:47-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.
(cherry picked from commit 6bdce35cdd59112a8cb4a4a3b061e854ada3ff63)
- - - - -
18d6ad8a by Ben Gamari at 2023-02-06T20:18:47-05:00
nonmoving: Fix unregisterised build
(cherry picked from commit 6df2709e7215ea80d7267800e0318aee2a7c277f)
- - - - -
30 changed files:
- includes/rts/Threads.h
- rts/Capability.c
- rts/Capability.h
- rts/Messages.h
- rts/PrimOps.cmm
- rts/Printer.c
- rts/ProfHeap.c
- rts/ProfilerReport.c
- rts/ProfilerReportJson.c
- rts/Profiling.c
- rts/Proftimer.c
- rts/RetainerProfile.c
- rts/RtsAPI.c
- rts/RtsStartup.c
- rts/SMPClosureOps.h
- rts/STM.c
- rts/Schedule.c
- rts/Stats.c
- rts/Task.c
- rts/Threads.c
- rts/TraverseHeap.c
- rts/eventlog/EventLog.c
- rts/hooks/LongGCSync.c
- rts/posix/Signals.c
- rts/sm/Compact.c
- rts/sm/Evac.c
- rts/sm/GC.c
- rts/sm/MarkWeak.c
- rts/sm/NonMoving.c
- rts/sm/NonMoving.h
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c461f51017d9d4ae1842a8455ebf05ab71ee9b16...18d6ad8a51b4fdc740934f8260fb4b4e4ab825e5
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c461f51017d9d4ae1842a8455ebf05ab71ee9b16...18d6ad8a51b4fdc740934f8260fb4b4e4ab825e5
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/20230207/b07c44a7/attachment-0001.html>
More information about the ghc-commits
mailing list