| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This distills the essence of the Sigs.hs program found in the ticket.
|
|
|
|
|
|
|
| |
This module exports unsafe pointer equality operations,
so we accordingly mark it as Unsafe.
Fixes #21433
|
|
|
|
|
|
|
| |
This fixes the initialisation functions when using -prof or
-finfo-table-map.
Fixes #21370
|
| |
|
|
|
|
|
|
| |
There was no mention of the changes to type-checking plugins
in the 9.4.1 notes, and the extending_ghc documentation contained
a reference to an outdated type.
|
| |
|
|
|
|
| |
This should fix #21352
|
|
|
|
|
|
| |
This means cost centres and coverage ticks will still be present in
output. Makes using -dsuppress-all more convenient when looking at
profiled builds.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here we deprecate the eventlogging RTS ways and instead enable eventlog
support in the remaining ways. This simplifies packaging and reduces GHC
compilation times (as we can eliminate two whole compilations of the RTS)
while simplifying the end-user story. The trade-off is a small increase
in binary sizes in the case that the user does not want eventlogging
support, but we think that this is a fine trade-off.
This also revealed a latent RTS bug: some files which included `Cmm.h`
also assumed that it defined various macros which were in fact defined
by `Config.h`, which `Cmm.h` did not include. Fixing this in turn
revealed that `StgMiscClosures.cmm` failed to import various spinlock
statistics counters, as evidenced by the failed unregisterised build.
Closes #18948.
|
|
|
|
| |
If the user has not configured a writer then there is nothing to flush.
|
| |
|
| |
|
|
|
|
| |
Fixes #21373
|
| |
|
|
|
|
|
|
| |
We also disable the stage1 testing which is broken.
Related to #21072
|
| |
|
|
|
|
|
|
| |
It's quite nice we can do this by mostly deleting code
Fixes #21373
|
| |
|
|
|
|
|
|
|
|
| |
Here we introduce support into our command-line parsing infrastructure
and driver for handling gnu-style response file arguments,
typically used to work around platform command-line length limitations.
Fixes #16476.
|
|
|
|
|
|
|
|
|
|
| |
We should only accept the type `Any` in foreign import/export
declarations when it has type `Type` or `UnliftedType`.
This patch adds a kind check, and a special error message triggered by
occurrences of `Any` in foreign import/export declarations at other
kinds.
Fixes #21305
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Solves the quadratic worst case performance of freeing megablocks that
was described in issue #19897.
During GC runs, we now keep a secondary free list for megablocks that is
neither sorted, nor coalesced. That way, free becomes an O(1) operation
at the expense of not being able to reuse memory for larger allocations.
At the end of a GC run, the secondary free list is sorted and then
merged into the actual free list in a single pass.
That way, our worst case performance is O(n log(n)) rather than O(n^2).
We postulate that temporarily losing coalescense during a single GC run
won't have any adverse effects in practice because:
- We would need to release enough memory during the GC, and then after
that (but within the same GC run) allocate a megablock group of more
than one megablock. This seems unlikely, as large objects are not
copied during GC, and so we shouldn't need such large allocations
during a GC run.
- Allocations of megablock groups of more than one megablock are rare.
They only happen when a single heap object is large enough to require
that amount of space. Any allocation areas that are supposed to hold
more than one heap object cannot use megablock groups, because only
the first megablock of a megablock group has valid `bdescr`s. Thus,
heap object can only start in the first megablock of a group, not in
later ones.
|
|
|
|
| |
As suggested in #20733.
|
| |
|
| |
|
|
|
|
| |
Also drops the unused TREC_COMMITTED transaction state.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a bug that @JunmingZhao42 and I noticed while working on her
MMTK port. Specifically, in stg_stop_thread we used stg_enter_info as a
sentinel at the tail of a stack after a thread has completed. However,
stg_enter_info expects to have a two-field payload, which we do not
push. Consequently, if the GC ends up somehow the stack it will attempt
to interpret data past the end of the stack as the frame's fields,
resulting in unsound behavior.
To fix this I eliminate this hacky use of `stg_stop_thread` and instead
introduce a new stack frame type, `stg_dead_thread_info`. Not only does
this eliminate the potential for the previously mentioned memory
unsoundness but it also more clearly captures the intended structure of
the dead threads' stacks.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop libtool logic from gen-dll, allowing us to drop the remaining logic
from the `configure` script.
Strangely, this appears to reliably reduce compiler allocations of
T16875 on Windows.
Closes #18826.
Metric Decrease:
T16875
|
|
|
|
|
| |
GHC no longers uses libtool for linking and therefore this is no longer
necessary.
|
|
|
|
|
|
|
|
|
| |
Previously we supported building statically-linked executables using
libtool. However, this was dropped in
91262e75dd1d80f8f28a3922934ec7e59290e28c in favor of using ar/ranlib
directly. Consequently we can drop this logic.
Fixes #18826.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As described in Note [Wired-in exceptions are not CAFfy], a small set of
built-in exception closures get special treatment in the code generator,
being declared as non-CAFfy despite potentially containing CAF
references. The original intent of this treatment for the RTS to then
add StablePtrs for each of the closures, ensuring that they are not
GC'd. However, this logic was not applied consistently and eventually
removed entirely in 951c1fb0. This lead to #21141.
Here we fix this bug by reintroducing the StablePtrs and document the
status quo.
Closes #21141.
|
| |
|
|
|
|
|
|
|
| |
To ensure that the build benefits from Hadrian's usual logic for building
packages, avoiding #21409.
Closes #21409.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously `test.mk` would try to determine whether the dynamic,
profiling, and vanilla library ways are available by searching for
`PrimOpWrappers.{,dyn_,p_}hi` in directory reported by `ghc-pkg field
ghc-prim library-dirs`. However, this is extremely fragile as
there is no guarantee that there is only one library directory. To
handle the case of multiple `library-dirs` correct we would
have to carry out the delicate task of tokenising the directory list (in
shell, no less).
Since this isn't a task that I am eager to solve, I have rather moved
the detection logic into the testsuite driver and instead perform a test
compilation in each of the ways. This should be more robust than the
previous approach.
I stumbled upon this while fixing #20579.
|
| |
|
|
|
|
|
|
|
|
| |
The package-specific include directories in
Settings.Builders.Common.cIncludeDirs are now redundant since they now
come from Cabal.
Closes #20566.
|
|
|
|
|
|
|
|
| |
Previously we only took `extraLibDirs` and friends from the package
description, ignoring any contribution from the `LocalBuildInfo`. Fix
this.
Fixes #20566.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Second fix to #21391. It turned out that we missed calling
bringFloatedDictsIntoScope when specialising imports, which
led to the same bug as before.
I refactored to move that call to a single place, in specCalls,
so we can't forget it.
This meant making `FloatedDictBinds` into its own type, pairing
the dictionary bindings themselves with the set of their binders.
Nicer this way.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "candidates" passed to decideMonoTyVars can contain coercion holes.
This is because we might well decide to quantify over some unsolved
equality constraints, as long as they are not definitely insoluble.
In that situation, decideMonoTyVars was passing a set of type variables
that was not closed over kinds to closeWrtFunDeps, which was tripping
up an assertion failure.
Fixes #21404
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The assertion in reportWanteds that we aren't suppressing all the
Wanted constraints was too strong: it might be the case that we are
inside an implication, and have already reported an unsolved Wanted
from outside the implication. It is possible that all Wanteds inside
the implication have been rewritten by the outer Wanted, so we shouldn't
throw an assertion failure in that case.
Fixes #21405
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* In CoreToStg, the application 'RUBBISH[rep] x' was simplified
to 'RUBBISH[rep]'. But it is possible that the result of the function
is represented differently than the function.
* In Unarise, 'LitRubbish (primRepToType prep)'
is incorrect: LitRubbish takes a RuntimeRep such as IntRep,
while primRepToType returns a type such as Any @(TYPE IntRep). Use
primRepToRuntimeRep instead.
This code is never run in the testsuite.
* In StgToByteCode, all rubbish literals were assumed to be boxed.
This code predates representation-polymorphic RubbishLit and I think
it was not updated.
I don't have a testcase for any of those issues, but the code looks
wrong.
|
|
|
|
| |
Previously only -dcore-lint was enabled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here we set GHC_ENVIRONMENT="-" to ensure that GHC invocations of tests
don't pick up a user's local package environment.
Fixes #21365.
Metric Decrease:
T10421
T12234
T12425
T13035
T16875
T9198
|
|
|
|
|
|
|
|
| |
Previously Hadrian's installation makefile would assume that the string
`xxx` did not appear in the installation path. This would of course
break for some users.
Fixes #21402.
|
|
|
|
|
|
| |
As of #18487 we no longer support 32-bit Windows.
Fixes #21372.
|
| |
|
| |
|