[Git][ghc/ghc][wip/backports-9.8-2] 10 commits: Accept performance shifts
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Fri Oct 4 11:01:54 UTC 2024
Ben Gamari pushed to branch wip/backports-9.8-2 at Glasgow Haskell Compiler / GHC
Commits:
6bd62051 by Ben Gamari at 2024-10-03T18:16:53-04:00
Accept performance shifts
MultiLayerModulesTH_Make performance regresses considerably, but
bizarrely only on Darwin.
Metric Increase:
MultiLayerModulesTH_Make
- - - - -
31458e17 by Teo Camarasu at 2024-10-04T11:01:49+00:00
rts: only collect live words in nonmoving census when non-concurrent
This avoids segfaults when the mutator modifies closures as we examine
them.
Resolves #24393
(cherry picked from commit 84357d1143fe4f9076253160f78fac6c2acc8e5b)
- - - - -
e1a55f94 by Andreas Klebinger at 2024-10-04T11:01:49+00:00
Fix ffi callbacks with >6 args and non-64bit args.
Check for ptr/int arguments rather than 64-bit width arguments when counting
integer register arguments.
The old approach broke when we stopped using exclusively W64-sized types to represent
sub-word sized integers.
Fixes #24314
(cherry picked from commit de589554386fc173a9019922851c05bb727e3450)
- - - - -
eb3cfe22 by Teo Camarasu at 2024-10-04T11:01:49+00:00
nonmoving: Add support for heap profiling
Add support for heap profiling while using the nonmoving collector.
We greatly simply the implementation by disabling concurrent collection for
GCs when heap profiling is enabled. This entails that the marked objects on
the nonmoving heap are exactly the live objects.
Note that we match the behaviour for live bytes accounting by taking the size
of objects on the nonmoving heap to be that of the segment's block
rather than the object itself.
Resolves #22221
(cherry picked from commit bedb4f0de102936099bda4e995cc83f1c344366c)
- - - - -
96be2f8a by Teo Camarasu at 2024-10-04T11:01:49+00:00
docs: move -xn flag beside --nonmoving-gc
It makes sense to have these beside each other as they are aliases.
(cherry picked from commit 98166389e166d4ab7cc2ddbc044261e508859de1)
- - - - -
a11df2e8 by Teo Camarasu at 2024-10-04T11:01:49+00:00
nonmoving: introduce a family of dense allocators
Supplement the existing power 2 sized nonmoving allocators with a family
of dense allocators up to a configurable threshold.
This should reduce waste from rounding up block sizes while keeping the
amount of allocator sizes manageable.
This patch:
- Adds a new configuration option `--nonmoving-dense-allocator-count`
to control the amount of these new dense allocators.
- Adds some constants to `NonmovingAllocator` in order to keep
marking fast with the new allocators.
Resolves #23340
(cherry picked from commit f830d5a34c4c972cced73b6dc25954cedf336747)
(cherry picked from commit 47e02c2ae0ea4713a2f22edf21b9a4eb5fe635be)
- - - - -
fa8dd0ce by Teo Camarasu at 2024-10-04T11:01:49+00:00
rts: use live words to estimate heap size
We use live words rather than live blocks to determine the size of the
heap for determining memory retention.
Most of the time these two metrics align, but they can come apart in
normal usage when using the nonmoving collector.
The nonmoving collector leads to a lot of partially occupied blocks. So,
using live words is more accurate.
They can also come apart when the heap is suffering from high levels
fragmentation caused by small pinned objects, but in this case, the
block size is the more accurate metric. Since this case is best avoided
anyway. It is ok to accept the trade-off that we might try (and
probably) fail to return more memory in this case.
See also the Note [Statistics for retaining memory]
Resolves #23397
(cherry picked from commit 35ef8dc83428f5405e092b12eb8cfc440b6504d8)
(cherry picked from commit 7991656954a2ba7d66fd75a8202af7d86327f279)
- - - - -
5d14190b by Ben Gamari at 2024-10-04T11:01:49+00:00
Add changelog entry for #23340
(cherry picked from commit 2b07bf2e8bcb24520fe78b469c3550b9f4099526)
- - - - -
112fa27d by Simon Peyton Jones at 2024-10-04T11:01:49+00:00
Update the unification count in wrapUnifierX
Omitting this caused type inference to fail in #24146.
This was an accidental omision in my refactoring of the
equality solver.
- - - - -
926eceaf by Fendor at 2024-10-04T11:01:49+00:00
Escape multiple arguments in the settings file
Uses responseFile syntax.
The issue arises when GHC is installed on windows into a location that
has a space, for example the user name is 'Fake User'.
The $topdir will also contain a space, consequentially.
When we resolve the top dir in the string `-I$topdir/mingw/include`,
then `words` will turn this single argument into `-I/C/Users/Fake` and
`User/.../mingw/include` which trips up the flag argument parser of
various tools such as gcc or clang.
We avoid this by escaping the $topdir before replacing it in
`initSettngs`.
Additionally, we allow to escape spaces and quotation marks for
arguments in `settings` file.
Add regression test case to count the number of options after variable
expansion and argument escaping took place.
Additionally, we check that escaped spaces and double quotation marks are
correctly parsed.
(cherry picked from commit 31bf85ee49fe2ca0b17eaee0774e395f017a9373)
(cherry picked from commit d74ffbbb93cb377e64c557f777089b81710ef873)
- - - - -
30 changed files:
- compiler/GHC/HsToCore/Foreign/C.hs
- compiler/GHC/Settings/IO.hs
- compiler/GHC/Tc/Solver/Monad.hs
- docs/users_guide/9.8.3-notes.rst
- docs/users_guide/eventlog-formats.rst
- docs/users_guide/runtime_control.rst
- hadrian/src/Rules/Generate.hs
- rts/Capability.h
- rts/ProfHeap.c
- rts/RtsFlags.c
- rts/Trace.c
- rts/Trace.h
- rts/eventlog/EventLog.c
- rts/eventlog/EventLog.h
- rts/gen_event_types.py
- rts/include/rts/Flags.h
- rts/include/rts/storage/Block.h
- rts/sm/GC.c
- rts/sm/NonMoving.c
- rts/sm/NonMoving.h
- rts/sm/NonMovingAllocate.c
- rts/sm/NonMovingCensus.c
- rts/sm/Sanity.c
- rts/sm/Storage.c
- rts/sm/Storage.h
- + testsuite/tests/ffi/should_run/T24314.hs
- + testsuite/tests/ffi/should_run/T24314.stdout
- + testsuite/tests/ffi/should_run/T24314_c.c
- testsuite/tests/ffi/should_run/all.T
- + testsuite/tests/ghc-api/settings-escape/T11938.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7da0c0a847d2e5e8c965d7373ac084a8c8dfe6c9...926eceafa1f3199220047ac7c0bec612414c4a6e
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7da0c0a847d2e5e8c965d7373ac084a8c8dfe6c9...926eceafa1f3199220047ac7c0bec612414c4a6e
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/20241004/52a61cfa/attachment.html>
More information about the ghc-commits
mailing list