| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
It is now shellcheck-clean.
|
|
|
|
| |
Previously this was dropped in the CI refactoring of !2487.
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than just display every 100 tests, work out how many to display
based on the total number of tests. This improves the experience when
running a small number of tests.
For [0..100] - Report every test
[100..1000] - Report every 10 tests
[1000..10000] - Report every 100 tests
and so on..
|
|
|
|
| |
Fixes #19122.
|
|
|
|
|
|
|
| |
As pointed in #19284, previously the order was a bit confusing.
This didn't affect the meaning but nevertheless it's much clearer now.
Closes #19284.
|
|
|
|
| |
closes #19365
|
| |
|
|
|
|
| |
And also for empty enumeration detection.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At a SPECIALSE pragma for an imported Id, we used to check that
it was marked INLINABLE. But that turns out to interact badly with
worker/wrapper: see Note [Worker-wrapper for INLINABLE functions] in
GHC.Core.Opt.WorkWrap.
So this small patch instead simply tests that we have an unfolding
for the function; see Note [SPECIALISE pragmas for imported Ids]
in GHC.Tc.Gen.Sig.
Fixes #19246
|
|
|
|
|
|
| |
This allows TypeMap to benefit from the nullary TyConApp sharing
optimisation described in Note [Sharing nullary TyConApps] in
GHC.Core.TyCon.
|
|
|
|
|
|
|
|
|
|
|
| |
See Note [Sharing nullary TyConApps] in GHC.Core.TyCon.
Closes #19367.
Metric Decrease:
T9872a
T9872b
T9872c
|
|
|
|
|
|
|
|
|
| |
This function is exposed in the RtsAPI.h so that external users have a
blessed way to traverse all the different `bdescr`s which are known by
the RTS.
The main motivation is to use this function in ghc-debug but avoid
having to expose the internal structure of a Capability in the API.
|
| |
|
|
|
|
|
|
| |
In a new `Note [Bottom CPR iff Dead-Ending Divergence]`.
Fixes #18086.
|
|
|
|
|
|
|
|
|
|
| |
Previously, the desugarer was looking up names referenced in TH-quoted `ANN`s
by using `globalVar`, which would allocate a fresh TH `Name`. In effect, this
would prevent quoted `ANN`s from ever referencing the correct identifier
`Name`, leading to #19377. The fix is simple: instead of `globalVar`, use
`lookupLOcc`, which properly looks up the name of the in-scope identifier.
Fixes #19377.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a redesign of the UnVarGraph data structure used by the call
arity analysis to avoid the pathologically-poor performance observed in
issue #18789. Specifically, deletions were previously O(n) in the case
of graphs consisting of many complete (bipartite) sub-graphs. Together
with the nature of call arity this would produce quadratic behavior.
We now encode deletions specifically, taking care to do some light
normalization of empty structures. In the case of the
`Network.AWS.EC2.Types.Sum` module from #19203, this brings the
runtime of the call-arity analysis from over 50 seconds down to less
than 2 seconds.
Metric Decrease:
T15164
WWRec
|
| |
|
|
|
|
| |
Fixes #19118
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Simon's concern in the old comment, specifically:
So all of the calls to traverseMaybeInitClosureData() here are
initialising retainer sets with the wrong flip.
Is actually exactly what the code was intended to do. It makes the closure
data valid, then at the beginning of the traversal the flip bit is flipped
resetting all closures across the heap to invalid.
Now it used to be that the profiling code using the traversal has it's own
sense of valid vs. invalid beyond what the traversal code does and indeed
the retainer profiler still does this, there a getClosureData of NULL is
considered an invalid retainer set.
So in effect there wasn't any difference in invalidating closure data
rather than just resetting it to a valid zero, which might be what confused
Simon at the time.
As the code is now it actually uses the value of the valid/invalid bit in
the form of the 'first_visit' argument to the 'visit' callback so there is
a difference.
|
|
|
|
| |
GCC warns that varadic functions simply cannot be inlined.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
For now this just tests that the order of the callbacks is what we expect
for a couple of synthetic heap graphs.
|
|
|
|
|
|
|
| |
The point of this is to let user code call traversePushClosure directly
instead of going through traversePushRoot. This in turn allows specifying a
stackElement to be used when the traversal returns from a top-level (root)
closure.
|
| |
|
| |
|
|
|
|
|
| |
This allows the global 'flip' variable not to be exported. This allows a
future commit to also make it part of the traversalState struct.
|
|
|
|
|
| |
Having a union in the closure profiling header really just complicates
things so get back to basics, we just have a single StgWord there for now.
|
|
|
|
| |
data_out was renamed to child_data at some point
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The callback 'return_cb' allows users to be perform additional accounting
when the traversal of a subtree is completed. This is needed for example to
determine the number or total size of closures reachable from a given
closure.
This commit also makes the lifetime increase of stackElements from commit
"rts: TraverseHeap: Increase lifetime of stackElements" optional based on
'return_cb' being set enabled or not.
Note that our definition of "subtree" here includes leaf nodes. So the
invariant is that return_cb is called for all nodes in the traversal
exactly once.
|
|
|
|
|
|
|
|
|
| |
The new 'sep' field links a stackElement to it's "parent". That is the
stackElement containing it's parent closure.
Currently not all closure types create long lived elements on the stack so
this does not cover all parents along the path to the root but that is
about to change in a future commit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This modifies the lifetime of stackElements such that they stay on the
stack until processing of all child closures is complete. Currently the
stackElement representing a set of child closures will be removed as soon
as processing of the last closure _starts_.
We will use this in a future commit to allow storing information on the
stack which should be accumulated in a bottom-up manner along the closure
parent-child relationship.
Note that the lifetime increase does not apply to 'type == posTypeFresh'
stack elements. This is because they will always be pushed right back onto
the stack as regular stack elements anyways.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new `otycon` production to the parser that allows for type
constructor names that are either alphanumeric (`tycon`) or symbolic
(`tyconsym`), where the latter must be parenthesized appropriately.
`otycon` is much like the existing `oqtycon` production, except that it does
not permit qualified names. The parser now uses `otycon` to parse type
constructor names in `ANN type` declarations, which fixes #19374.
To make sure that all of this works, I added three test cases:
* `should_compile/T19374a`: the original test case from #19374
* `should_fail/T19374b`: a test that makes sure that an `ANN` with a qualified
name fails to parse
* `should_fail/T19374c`: a test that makes sure that an `ANN type` with a
qualified name fails to parse
|
|
|
|
|
| |
Fixes #17853. We mustn't discard the result of pickGREs, because doing
so might lead to incorrect redundant import warnings.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is just a tidy-up for the post-strictness-analysis
worker wrapper split. Consider
f x = x
Strictnesss analysis does not lead to a w/w split, so the
obvious thing is to leave it 100% alone. But actually, because
the RHS is small, we ended up adding a StableUnfolding for it.
There is some reason to do this if we choose /not/ do to w/w
on the grounds that the function is small. See
Note [Don't w/w inline small non-loop-breaker things]
But there is no reason if we would not have done w/w anyway.
This patch just moves the conditional to later. Easy.
This does move some -ddump-simpl printouts around a bit.
I also discovered that the previous code was overwritten an
InlineCompulsory with InlineStable, which is utterly wrong. That in
turn meant that some default methods (marked InlineCompulsory)
were getting their InlineCompulsory squashed. This patch fixes
that bug --- but of course that does mean a bit more inlining!
Metric Decrease:
T9233
T9675
Metric Increase:
T12707
T11374
T3064
T4029
T9872b
T9872d
haddock.Cabal
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
We don't need to compile/link an additional empty C file when it is not
needed.
This patch may also fix #18938 by avoiding trying to lookup the RTS unit
when there is none (yet) in the unit database.
|
|
|
|
|
|
| |
This is a small fix that depends on the previous commit, because it
corrected the rnExpr free variable calculation for HsVars which refer
to ambiguous fields. Fixes #19213.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #5972. This adds an extension NoFieldSelectors to disable the generation
of selector functions corresponding to record fields. When this extension is
enabled, record field selectors are not accessible as functions, but users are
still able to use them for record construction, pattern matching and updates.
See Note [NoFieldSelectors] in GHC.Rename.Env for details.
Defining the same field multiple times requires the DuplicateRecordFields
extension to be enabled, even when NoFieldSelectors is in use.
Along the way, this fixes the use of non-imported DuplicateRecordFields in GHCi
with -fimplicit-import-qualified (fixes #18729).
Moreover, it extends DisambiguateRecordFields to ignore non-fields when looking
up fields in record updates (fixes #18999), as described by
Note [DisambiguateRecordFields for updates].
Co-authored-by: Simon Hafner <hafnersimon@gmail.com>
Co-authored-by: Fumiaki Kinoshita <fumiexcel@gmail.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Alignments passed to alloca and friends must be a power of two for the code
in allocatePinned to work properly. Commit 41230e2601 ("Zero out pinned
block alignment slop when profiling") introduced an ASSERT for this but
this test was still violating it.
|
|
|
|
|
|
|
| |
Previously the Hadrian codepath of `validate` inverted the logic which
decides whether the test build of `xhtml` should be built with
`--enable-shared`. This resulted in validate failures on Windows, which
does not support dynamic linkage of Haskell code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In GHC.Core.SimpleOpt, I found that its inlining could duplicate
an arbitary redex inside a lambda! Consider (\xyz. x+y). The
occurrence-analysis treats the lamdda as a group, and says that
both x and y occur once, even though the occur under the lambda-z.
See Note [Occurrence analysis for lambda binders] in OccurAnal.
When the lambda is under-applied in a call, the Simplifier is
careful to zap the occ-info on x,y, because they appear under the \z.
(See the call to zapLamBndrs in simplExprF1.) But SimpleOpt
missed this test, resulting in #19347.
So this patch
* commons up the binder-zapping in GHC.Core.Utils.zapLamBndrs.
* Calls this new function from GHC.Core.Opt.Simplify
* Adds a call to zapLamBndrs to GHC.Core.SimpleOpt.simple_app
This change makes test T12990 regress somewhat, but it was always
very delicate, so I'm going to put up with that.
In this voyage I also discovered a small, rather unrelated infelicity
in the Simplifier:
* In GHC.Core.Opt.Simplify.simplNonRecX we should apply isStrictId
to the OutId not the InId. See Note [Dark corner with levity polymorphism]
It may never "bite", because SimpleOpt should have inlined all
the levity-polymorphic compulsory inlnings already, but somehow
it bit me at one point and it's generally a more solid thing
to do.
Fixing the main bug increases runtime allocation in test
perf/should_run/T12990, for (acceptable) reasons explained in a
comement on
Metric Increase:
T12990
|