summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ci: lint-ci-config: regenerate cabal.configghc-9.4.5-releasewip/ghc-9.4.5-backportsghc-9.4Zubin Duggal2023-04-161-0/+1
|
* Prepare release 9.4.5Zubin Duggal2023-04-155-4/+225
| | | | | | | | | | | | | | Metric Decrease: T13035 T15164 T1969 T9961 WWRec T12707 T13379 Metric Increase: T17123
* Check for FP_LD_NO_FIXUP_CHAINS in installation configure scriptMatthew Pickering2023-04-151-0/+5
| | | | | | | | | Otherwise, when installing from a bindist the C flag isn't passed to the C compiler. This completes the fix for #22429 (cherry picked from commit 926cd4ee097106cf9c6d1ae1fc32375e7fc45ff2)
* Store bootstrap_llvm_target and use it to set LlvmTarget in bindistsMatthew Pickering2023-04-153-1/+10
| | | | | | | | | | | | | This mirrors some existing logic for the bootstrap_target which influences how TargetPlatform is set. As described on #21970 not storing this led to `LlvmTarget` being set incorrectly and hence the wrong `--target` flag being passed to the C compiler. Towards #21970 (cherry picked from commit 64286132cc0db4e227637887f98f5a3ecf7d326a) (cherry picked from commit 48a9e688331fbc2ac91392c654bb7457c5f8a876)
* darwin ci: Explicitly pass desired build triple to configureMatthew Pickering2023-04-151-1/+1
| | | | | | On the zw3rk machines for some reason the build machine was inferred to be arm64. Setting the build triple appropiately resolve this confusion and we produce x86 binaries.
* Allow running memInventory when the concurrent nonmoving gc is enabledTeo Camarasu2023-04-142-5/+14
| | | | | | | | | | | If the nonmoving gc is enabled and we are using a threaded RTS, we now try to grab the collector mutex to avoid memInventory and the collection racing. Before memInventory was disabled. (cherry picked from commit 62c3f7ee4199305cde009ededeae6ece1bcde7f0) (cherry picked from commit fabc5a1c9aa468e97429ca5f8e501ec4fbd1084f)
* fix: account for large and compact object stats with nonmoving gcTeo Camarasu2023-04-145-7/+36
| | | | | | | | | Make sure that we keep track of the size of large and compact objects that have been moved onto the nonmoving heap. We keep track of their size and add it to the amount of live bytes in nonmoving segments to get the total size of the live nonmoving heap. Resolves #17574 (cherry picked from commit 20c6669fc46c567e00d3cdf22aa84479b6d8dc17)
* Add regression test for #17574Teo Camarasu2023-04-143-0/+44
| | | | | | This test currently fails in the nonmoving way (cherry picked from commit a56141a69842a78d56ec11be85a775eb703219bf)
* compiler: Fix performance regression in backport of "Make FloatIn robust to ↵Zubin Duggal2023-04-141-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | shadowing" (6206cb9287f3f6e70c669660a646a65274870d2b) In 9.4, we have noFloatIntoArg :: CoreExprWithFVs' -> Type -> Bool noFloatIntoArg expr expr_ty = ... But in master when 6206cb92 landed, after "Drop the app invariant" (dcf30da8) we had noFloatIntoArg :: CoreExprWithFVs' -> Bool noFloatIntoArg expr = ... When deciding whether to float things into the argument of a function, in 9.4 we must know the type of the argument. This was previously done by extracting the type of the argument from the function type, computed as we walked through all the arguments. However, this backport regressed compile time performance due to allocations by `exprType` particularly in T16577 and T5642, where it turns out that computing the type of the arguments to a function is quite expensive. Instead, we can compute the type of the argument by looking at the argument term directly, which turns out to be much faster and eliminates the performance regression.
* rts: Fix incorrect format specifier warningsBen Gamari2023-04-141-2/+4
|
* contextswitchBen Gamari2023-04-141-1/+1
|
* hadrian: Add +boot_nonmoving_gc flavour transformerBen Gamari2023-04-141-0/+8
| | | | | | For using GHC bootstrapping to validate the non-moving GC. (cherry picked from commit ec382ccc087015db3d8782d3079c757ef8f10e9b)
* nonmoving: Non-concurrent collectionBen Gamari2023-04-147-82/+132
| | | | (cherry picked from commit be9b4ca4da78b10bc065957472ecf2c8ce7599a4)
* rts: Capture GC configuration in a structBen Gamari2023-04-143-19/+34
| | | | | | | The number of distinct arguments passed to GarbageCollect was getting a bit out of hand. (cherry picked from commit ac0240af44026b9fcc08b62beef696ce7ea50e53)
* testsuite: Mark ffi023 as broken due to #23089Ben Gamari2023-04-141-0/+1
| | | | (cherry picked from commit 600fdd58332e52ac1620178f4b4a296e131465a1)
* nonmoving: Split out nonmovingAllocateGCBen Gamari2023-04-144-15/+55
| | | | (cherry picked from commit cfc68b5c9ee9000010ccb2b7f1d346542df3b79f)
* nonmoving: Move allocator into new source fileBen Gamari2023-04-147-198/+237
| | | | (cherry picked from commit e6f7b809885609de9e647e7f96cc95929fde7a4a)
* nonmoving: Ensure that sanity checker accounts for saved_filled segmentsBen Gamari2023-04-141-0/+1
| | | | (cherry picked from commit 7cc7461c74bf78aca0987c8e8e0ec48297c28f2c)
* nonmoving: Fix unregisterised buildBen Gamari2023-04-141-0/+4
| | | | (cherry picked from commit f2ef2f5e7a01cf5ec97b751f344233a6a8b781ca)
* rts: Encapsulate block allocator spinlockBen Gamari2023-04-147-21/+28
| | | | | | | This makes it a bit easier to add instrumentation on this spinlock while debugging. (cherry picked from commit 9c9899d5c99f09312a093b5cf99e5a0a9579bf3a)
* nonmoving: Don't call prepareUnloadCheckBen Gamari2023-04-141-1/+2
| | | | | | | | 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 b284e1c1d1e8e2513a286e3bbc5f46d635b33dd8)
* rts/Sanity: Fix block count assertion with non-moving collectorBen Gamari2023-04-141-3/+13
| | | | | | | | | 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. (cherry picked from commit a9062eaa577b3f1edf07908e57832524b5525d7d)
* nonmoving: Fix Note referencesBen Gamari2023-04-147-8/+8
| | | | | | | Some references to Note [Deadlock detection under the non-moving collector] were missing an article. (cherry picked from commit 43fda6487f729f8c627dbb2abbfc027444d54e52)
* nonmoving: Move current segment array into CapabilityBen Gamari2023-04-1411-135/+86
| | | | | | | | | | | | | | | | 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. (cherry picked from commit f849374508432ce07c25db8848fbea0d71040038)
* rts: Reenable assertionBen Gamari2023-04-141-1/+1
| | | | (cherry picked from commit 5b60acba8d76ecc4d733043460972633b13eedb0)
* nonmoving: Allow pinned gen0 objects to be WEAK keysBen Gamari2023-04-141-4/+14
| | | | (cherry picked from commit 0c6f15762d14ade2666d5ad7f665718b4a10f89e)
* nonmoving: Sync-phase mark budgetingBen Gamari2023-04-143-12/+86
| | | | | | | | | | | | 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. (cherry picked from commit 023998885b16bea51c0c1cdceb3f0ef96dccd5e4)
* nonmoving: Be more paranoid in segment trackingBen Gamari2023-04-143-1/+7
| | | | | | | 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 ca3bc40255ffadfd0df31ec3a6ec5df7ca7f663e)
* nonmoving: Don't push if nonmoving collector isn't enabledBen Gamari2023-04-141-1/+1
| | | | (cherry picked from commit b15c813717ab9797df7733575904a7131bc4044c)
* nonmoving: Avoid n_caps raceBen Gamari2023-04-141-4/+4
| | | | (cherry picked from commit 68fa47f3f5d1c207bd9edd7206bcceb150377647)
* nonmoving: Post-sweep sanity checkingBen Gamari2023-04-141-3/+15
| | | | (cherry picked from commit e941801a267a3b9d898b48d90737924a7b7e4da2)
* nonmoving: Add missing write barriers in selector optimisationBen Gamari2023-04-142-6/+62
| | | | | | | | | This fixes the selector optimisation, adding a few write barriers which are necessary for soundness. See the inline comments for details. Fixes #22930. (cherry picked from commit bd80fcd18f7be5b9d445d80c828b1a734c0e5a3b)
* nonmoving: Don't clobber update rem sets of old capabilitiesBen Gamari2023-04-141-1/+1
| | | | | | | | | | | 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. (cherry picked from commit 7dc1679b133672029dd7afae834a7fc67265035c)
* nonmoving: Handle new closures in nonmovingIsNowAliveBen Gamari2023-04-142-8/+18
| | | | | | | We must conservatively assume that new closures are reachable since we are not guaranteed to mark such blocks. (cherry picked from commit 3e47be7887b2df48d2ad50791a98131634d7e8ec)
* nonmoving: Assert state of swept segmentsBen Gamari2023-04-142-0/+3
| | | | (cherry picked from commit d478ac18395962d33e14fc378ad9a424bdcd1496)
* nonmoving: Fix tracking of FILLED_SWEEPING segmentsBen Gamari2023-04-141-1/+1
| | | | | | | Previously we only updated the state of the segment at the head of each allocator's filled list. (cherry picked from commit 4392965d14920117db2cf4ce460dec6f094f6dfe)
* nonmoving: Don't show occupancy if we didn't collect live wordsBen Gamari2023-04-143-17/+41
| | | | (cherry picked from commit 3288e96d4ffe8c5f70929c4fedbfef918148def1)
* nonmoving: Sanity check mutable listBen Gamari2023-04-141-0/+1
| | | | | | | Assert that entries in the nonmoving generation's generational remembered set (a.k.a. mutable list) live in nonmoving generation. (cherry picked from commit 2f08265751c13f7bd0df1c46928fc09a064a8add)
* nonmoving: Sanity check nonmoving large objects and compactsBen Gamari2023-04-141-0/+5
| | | | (cherry picked from commit 90e240045c1ac5047f4038bbeed6d2b71b20bc77)
* nonmoving: Fix handling of weak pointersBen Gamari2023-04-146-79/+161
| | | | | | | | | | | | | | | 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 683e0c7aef2bbfedbee02c8fa32789e32c89a4db)
* nonmoving: Don't push empty arrays to update remembered setBen Gamari2023-04-141-2/+2
| | | | | | | | | | Previously the write barrier of resizeSmallArray# incorrectly handled resizing of zero-sized arrays, pushing an invalid pointer to the update remembered set. Fixes #22931. (cherry picked from commit 244640a067c0158db5f14f133212caa1a830030e)
* nonmoving: Add missing no-op in busy-wait loopBen Gamari2023-04-141-2/+5
| | | | (cherry picked from commit ed5443ec9195f27522abf4b2882dbc6b6a9f17f5)
* nonmoving: Clarify commentBen Gamari2023-04-141-1/+1
| | | | (cherry picked from commit 883d00f9cfffe3bd451f7302116eb29ce836c600)
* nonmoving: Clarify implementationBen Gamari2023-04-141-10/+11
| | | | | | This makes the intent of this implementation a bit clearer. (cherry picked from commit ba3c7b67bd74906de63b3988b18a14b01861d3c9)
* Evac: Squash data race in eval_selector_chainBen Gamari2023-04-141-2/+3
| | | | (cherry picked from commit 9ce9fba46bf3fe1af4ce39dba4276bb241f3ea29)
* rts/Sanity: Look at nonmoving saved_filled listsBen Gamari2023-04-141-0/+2
| | | | (cherry picked from commit ce4cf9d59552b52ae3d4c1c1e71a83296f022c27)
* rts/Sanity: Mark pinned_object_blocksBen Gamari2023-04-141-0/+1
| | | | (cherry picked from commit 3223048a1ee73384010aa20be548bad95ef1744a)
* rts/BlockAlloc: Allow disabling of internal assertionsBen Gamari2023-04-141-6/+16
| | | | | | | These can be quite expensive and it is sometimes useful to compile a DEBUG RTS without them. (cherry picked from commit 3072bef55dc6e123e7eb84bb9154a13db4d043da)
* rts: Fix type issues in Sparks.hBen Gamari2023-04-141-2/+2
| | | | | | Adds explicit casts to satisfy a C++ compiler. (cherry picked from commit 8623ab4bd7fb1326cebb3191fdee841af74bb345)
* nonmoving: Deduplicate assertionBen Gamari2023-04-141-2/+9
| | | | (cherry picked from commit 1cc4bd7a169c6d813330d3613836889568515000)