| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The package.cache needs to have a later mod-time than all of the .conf
files. This invariant can be destroyed by `cp -r` and so we run `ghc-pkg
recache` to ensure the package database which is distributed is
consistent.
If you are installing a relocatable bindist, for example, on windows,
you should preserve mtimes by using cp -a or run ghc-pkg recache after
installing.
|
| |
|
| |
|
|
|
|
| |
Fixes #19868
|
| |
|
|
|
|
|
|
|
|
|
| |
Before we would just copy the unversioned executable into the bindist.
Now the actual executable is copied into the bindist and a version
suffix is added. Then a wrapper or symlink is added which points to the
versioned executable.
Fixes #20074
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
create
Exes
----
Before: The whole bin/ folder was copied which could contain random old/stale/testsuite executables
After: Be precise
Wrappers
--------
Before: Wrappers were created for everything in the bin folder,
including internal executables such as "unlit"
After: Only create wrappers for the specific things which we want to
include in the user's path.
This makes the hadrian bindists match up more closely with the make
bindists.
|
| |
|
|
|
|
| |
entire test run
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
performance tests
|
|
|
|
|
|
|
| |
outcomes/validation paths
ShellCheck(https://github.com/koalaman/shellcheck/wiki) has been used to check
the script.
|
|
|
|
|
|
|
|
|
| |
The `divInt#` implementation note has heading:
See Note [divInt# implementation]
This seems to be a copy/paste mistake. Remove "See" from the
heading.
|
|
|
|
| |
Fixes #20160.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we relied on the caller to check the return value from
broadcastCondition and friends, most of whom neglected to do so. Given
that these functions should not fail anyways, I've opted to drop the
return value entirely and rather move the result check into the
OSThreads functions.
This slightly changes the semantics of timedWaitCondition which now
returns false only in the case of timeout, rather than any error as
previously done.
|
|
|
|
| |
Previously we would only catch EDEADLK errors.
|
| |
|
| |
|
|
|
|
|
| |
Previously the rts's cabal file would claim that it bundled libffi, even
if we are using the system's libffi. Fixes #19869.
|
|
|
|
|
| |
Previously we would often allow cabal flags to default, making it harder
than necessary to reason about the effective build configuration.
|
|
|
|
| |
All uses of these now use ExecPage.
|
|
|
|
|
| |
Here we introduce a very thin abstraction for allocating, filling, and
freezing executable pages to replace allocateExec.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Previously the libffi Adjustor implementation would use allocateExec to
create executable mappings. However, allocateExec is also used elsewhere
in GHC to allocate things other than ffi_closure, which is a use-case
which libffi does not support.
|
| |
|
|
|
|
|
|
|
|
| |
Previously the -Wcompat-unqualified-imports warning would first check
whether an import is of a covered module, incurring an map lookup,
before checking the simple boolean predicate of whether it is qualified.
This is more expensive than strictly necessary (although at the moment
the warning is unused, so this will make little difference).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Pthread based timer was initialized started while some other parts of
the RTS assume it is initialized stopped, e.g. in hs_init_ghc:
/* Start the "ticker" and profiling timer but don't start until the
* scheduler is up. However, the ticker itself needs to be initialized
* before the scheduler to ensure that the ticker mutex is initialized as
* moreCapabilities will attempt to acquire it.
*/
* after a fork, don't start the timer before the IOManager is
initialized: the timer handler (handle_tick) might call wakeUpRts to
perform an idle GC, which calls wakeupIOManager/ioManagerWakeup
Found while debugging #18033/#20132 but I couldn't confirm if it fixes
them.
|
|
|
|
|
|
| |
Previously hadrian would add a -I$FfiIncludeDir flag to compiler
invocations even if FfiIncludeDir was null, resulting in compilation
errors.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In `checkBlockingQueues` we must always untag the `bh` field of an `StgBlockingQueue`.
While at first glance it might seem a sensible assumption that `bh` will
always be a blackhole and therefore never be tagged, the GC could
shortcut the indirection and put a tagged pointer into the indirection.
This blew up on aarch64-darwin with a misaligned access. `bh` pointed
to an address that always ended in 0xa. On architectures that
are a little less strict about alignment, this would have read
a garbage info table pointer, which very, very unlikely would have been equal to
`stg_BLACKHOLE_info` and therefore things accidentally worked. However,
on AArch64, the read of the info table pointer resulted in a SIGBUS due
to misaligned read.
Fixes #20093.
|
|
|
|
|
|
|
| |
We failed at doing caching properly, so for now we won't do any
caching at all. This is not safe in a concurrent setting, however
all our darwin builders run with concurrency 1, and -j8, on 8 core
m1 mac minis.
|
| |
|
|
|
|
|
|
|
|
| |
Previously the `MO_S_Quot` constant folding rule would incorrectly pass
the shift amount of the same width as the shifted value. However, the
machop's type expects the shift amount to be a Word.
Fixes #20142.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was noticed in #20134 that each simplifier iteration used an
increasing amount of memory and that a certain portion of memory was not
released until the simplfier had completely finished.
I profiled the program using `-hi` profiling and observed that there was
a thunk arising in the computation of `ug_boring_ok`. On each iteration
`ug_boring_ok` would be updated, but not forced, which would leave a
thunk in the shape of
ug_boring_ok = inlineBoringOk expr0 || inlineBoringOk expr2 || inlineBoringOk expr3 || ...
which would retain all previous `expr` until `ug_boring_ok` was forced
or discarded.
Forcing this accumulator eagerly results in a flat profile over multiple
simplifier runs.
This reduces the maximum residency when compiling the test in #20134
from 2GB to 1.3G.
-------------------------
Metric Decrease:
T11545
-------------------------
|
|
|
|
|
|
|
|
|
|
|
|
| |
Methodology: Create a -hi profile and then search for TcGblEnv
then use ghc-debug to work out why they are being retained and remove
the reason.
Retaining TcGblEnv is dangerous because it contains pointers to things
such as a TypeEnv which is updated throughout compilation. I found two
places which were retaining a TcGblEnv unecessarily.
Also fix a few places where an OccName was retaining an Id.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a very subtle bug in withEncodedCString where a reference would
be kept to the whole continuation until the continuation had finished
executing. This was because the call to tryFillBufferAndCall could fail,
if the buffer was already full and so the `go` helper would be
recursively called on failure which necessitated keeping a reference to
`act`.
The failure could only happen during the initial checking phase of the
function but not during the call to the continuation. Therefore the fix
is to first perform the size check, potentially recursively and then
finally calling tail calling the continuation.
In the real world, this broke writing lazy bytestrings because a
reference to the head of the bytestring would be retained in the
continuation until the whole string had been written to a file.
Fixes #20107
|
|
|
|
| |
Closes #13157
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fixes #9192 and #17126
updates containers submodule
1. Changes the type of the primop `reallyUnsafePtrEquality#` to the most
general version possible (heterogeneous as well as levity-polymorphic):
> reallyUnsafePtrEquality#
> :: forall {l :: Levity} {k :: Levity}
> (a :: TYPE (BoxedRep l)) (b :: TYPE (BoxedRep k))
> . a -> b -> Int#
2. Adds a new internal module, `GHC.Ext.PtrEq`, which contains pointer
equality operations that are now subsumed by `reallyUnsafePtrEquality#`.
These functions are then re-exported by `GHC.Exts` (so that no function
goes missing from the export list of `GHC.Exts`, which is user-facing).
More specifically, `GHC.Ext.PtrEq` defines:
- A new function:
* reallyUnsafePtrEquality :: forall (a :: Type). a -> a -> Int#
- Library definitions of ex-primops:
* `sameMutableArray#`
* `sameSmallMutableArray`
* `sameMutableByteArray#`
* `sameMutableArrayArray#`
* `sameMutVar#`
* `sameTVar#`
* `sameMVar#`
* `sameIOPort#`
* `eqStableName#`
- New functions for comparing non-mutable arrays:
* `sameArray#`
* `sameSmallArray#`
* `sameByteArray#`
* `sameArrayArray#`
These were requested in #9192.
Generally speaking, existing libraries that
use `reallyUnsafePtrEquality#` will continue to work with the new,
levity-polymorphic version. But not all!
Some (`containers`, `unordered-containers`, `dependent-map`) contain
the following:
> unsafeCoerce# reallyUnsafePtrEquality# a b
If we make `reallyUnsafePtrEquality#` levity-polymorphic, this code
fails the current GHC representation-polymorphism checks.
We agreed that the right solution here is to modify the library;
in this case by deleting the call to `unsafeCoerce#`,
since `reallyUnsafePtrEquality#` is now type-heterogeneous too.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Three new tests for type-checking plugins:
- TcPlugin_Nullary, solving a nullary class constraint
- TcPlugin_Args, providing evidence for a (unary) class constraint
using arguments supplied to the plugin
- TcPlugin_TyFam, solving an equality constraint to rewrite
a type-family application
More extensive descriptions of the plugins can be found in their
respective defining modules.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch enhances OccurAnal perf by using a dedicated WithUsageDetails
datatype instead of a tuple (similarly to what has been done in
demand-analysis) with strict fields.
OccEnv is also passed strictly with more strict fields as it improves
results even more.
T9198 flukes isn't reproducible locally (cf
https://gitlab.haskell.org/ghc/ghc/-/merge_requests/5667#note_364358)
Metric Decrease:
ManyConstructors
T10421
T12150
T12425
T12707
T13056
T13253
T13253-spj
T15164
T16577
T18282
T18698a
T18698b
T1969
T4801
T5642
T9020
T9233
T9630
T9675
T9961
WWRec
T12227
T13035
T18304
T6048
T12234
T783
T20049
Metric Increase:
T9198
|
|
|
|
| |
These are the last to be converted.
|