| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Previously we just tested for the threaded2 when determining whether to
skip tests which are fragile under concurrent execution. However, this
isn't the only way which is concurrent.
|
|
|
|
|
|
|
| |
... for testing presence of NCG
This commit adds a criterion for checking whether we can expect sensible
output from --ddump-asm.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The option `confdir` (used in GhostScript test) was set correctly
via `--config` in `test.mk` and incorrectly via `config/ghc`.
AFAICT, some time ago this was working because the
incorrect assignment was done first, and later it broke.
Hardian doesn't pass `confdir`. I removed `confdir` and use
`config.top` to determine the directory of the
`good.ps` and `bad.ps` files. This is simpler.
I also removed some redundant assignments in `config/ghc`.
Test Plan: manually set config.have_profiling and make test
Reviewers: bgamari
Subscribers: rwbarton, carter
GHC Trac Issues: #15856
Differential Revision: https://phabricator.haskell.org/D5298
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
on windows, plugins are loaded via .a files,
but those paths were not being searched when loading plugins
Test Plan: ./validate
Reviewers: Phyx, bgamari
Reviewed By: Phyx
Subscribers: RyanGlScott, rwbarton, carter
GHC Trac Issues: #15700
Differential Revision: https://phabricator.haskell.org/D5253
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately the implementation has confused the ability to make
dynamic libraries with dynamic way.
This constraint is only true for systems that require `-fPIC` for
shared libraries.
Since the implementation has this implicit assumption, mark the tests
as requiring dynway.
Test Plan: ./validate
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: simonpj, rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5174
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
- Avoid import *; this helps tools such as pyflakes.
The last occurrence in runtests.py is not easy to remove
as it's used by .T files.
- Use False/True instead of 0/1.
Test Plan: validate
Reviewers: bgamari, thomie, simonmar
Reviewed By: thomie
Subscribers: rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5062
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
In Python 3, subprocess.communicate() returns a pair of bytes, which
need to be decoded. In runtests.py, we were just calling str() instead,
which converts b'x' to "b'x'". As a result, the loop that was checking
pkginfo for lines starting with 'library-dirs' couldn't work.
Reviewers: bgamari, thomie, Phyx
Reviewed By: thomie
Subscribers: Phyx, rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5046
|
|
|
|
|
| |
The DEBUG compiler's GHCi still leaks. This commit suppresses
testsuite failures due to this leak. See #15372.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
(re-applying this patch now that D4659 is committed)
Space leaks in GHCi emerge from time to time and tend to come back again
after they get fixed. This is an attempt to limit regressions by
* adding a reliable detection for some classes of space leaks in GHCi
* turning on leak checking for all GHCi tests in the test suite, so that
we'll notice if the leak appears again.
The idea for detecting space leaks is quite simple:
* find some data that we expect to be GC'd later, make a weak pointer to it
* when we expect the data to be dead, do a `performGC` and then check
the status of the weak pointer.
It would be nice to apply this trick to lots of things in GHC,
e.g. ensuring that HsSyn is not retained after the desugarer, or
ensuring that CoreSyn from the previous simplifier pass is not retained.
Test Plan: validate
Reviewers: bgamari, simonpj, erikd, niteria
Subscribers: thomie, carter
GHC Trac Issues: #15111
|
|
|
|
| |
This reverts commit 5fe6aaa3756cda654374ebfd883fa8f064ff64a4.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Space leaks in GHCi emerge from time to time and tend to come back again
after they get fixed. This is an attempt to limit regressions by
* adding a reliable detection for some classes of space leaks in GHCi
* turning on leak checking for all GHCi tests in the test suite, so that
we'll notice if the leak appears again.
The idea for detecting space leaks is quite simple:
* find some data that we expect to be GC'd later, make a weak pointer to it
* when we expect the data to be dead, do a `performGC` and then check
the status of the weak pointer.
It would be nice to apply this trick to lots of things in GHC,
e.g. ensuring that HsSyn is not retained after the desugarer, or
ensuring that CoreSyn from the previous simplifier pass is not retained.
Test Plan: validate
Reviewers: bgamari, simonpj, erikd, niteria
Subscribers: thomie, carter
GHC Trac Issues: #15111
Differential Revision: https://phabricator.haskell.org/D4658
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit 74615f412ad3de2910a156ff494bfe5497fada7e
("UNREG: ignore -fllvm (Trac #13495)") enabled
'optllvm' tests to be ran in 'make fulltest' mode.
As a result many (~1000) tests fail due to stderr misamatch:
+when making flags consistent: warning:
+ Compiler unregisterised, so compiling via C
The change removes 'optllvm' tests for unregisterised compiler.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: harbormaster
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2991
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Power ISA says the result of a division by zero is undefined. So
ignore stdout on PowerPC 64-bit systems.
Disable ext-interp tests on 64-bit PowerPC. We don't have support for
PowerPC 64-bit ELF in the RTS linker, which is needed for the external
interpreter.
Test Plan: ./validate
Reviewers: austin, simonmar, hvr, erikd, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2782
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't have any other tests for this, except one Template Haskell
test. This would have caught the bug I just fixed in D2868, at least
when validating with profiling on.
Test Plan: Ran tests
Reviewers: niteria, austin, erikd, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2869
GHC Trac Issues: #5654
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This commit makes various improvements and addresses some issues with
Compact Regions (aka Compact Normal Forms).
This was the most important thing I wanted to fix. Compaction
previously prevented GC from running until it was complete, which
would be a problem in a multicore setting. Now, we compact using a
hand-written Cmm routine that can be interrupted at any point. When a
GC is triggered during a sharing-enabled compaction, the GC has to
traverse and update the hash table, so this hash table is now stored
in the StgCompactNFData object.
Previously, compaction consisted of a deepseq using the NFData class,
followed by a traversal in C code to copy the data. This is now done
in a single pass with hand-written Cmm (see rts/Compact.cmm). We no
longer use the NFData instances, instead the Cmm routine evaluates
components directly as it compacts.
The new compaction is about 50% faster than the old one with no
sharing, and a little faster on average with sharing (the cost of the
hash table dominates when we're doing sharing).
Static objects that don't (transitively) refer to any CAFs don't need
to be copied into the compact region. In particular this means we
often avoid copying Char values and small Int values, because these
are static closures in the runtime.
Each Compact# object can support a single compactAdd# operation at any
given time, so the Data.Compact library now enforces mutual exclusion
using an MVar stored in the Compact object.
We now get exceptions rather than killing everything with a barf()
when we encounter an object that cannot be compacted (a function, or a
mutable object). We now also detect pinned objects, which can't be
compacted either.
The Data.Compact API has been refactored and cleaned up. A new
compactSize operation returns the size (in bytes) of the compact
object.
Most of the documentation is in the Haddock docs for the compact
library, which I've expanded and improved here.
Various comments in the code have been improved, especially the main
Note [Compact Normal Forms] in rts/sm/CNF.c.
I've added a few tests, and expanded a few of the tests that were
there. We now also run the tests with GHCi, and in a new test way
that enables sanity checking (+RTS -DS).
There's a benchmark in libraries/compact/tests/compact_bench.hs for
measuring compaction speed and comparing sharing vs. no sharing.
The field totalDataW in StgCompactNFData was unnecessary.
Test Plan:
* new unit tests
* validate
* tested manually that we can compact Data.Aeson data
Reviewers: gcampax, bgamari, ezyang, austin, niteria, hvr, erikd
Subscribers: thomie, simonpj
Differential Revision: https://phabricator.haskell.org/D2751
GHC Trac Issues: #12455
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Not having SCCs at the top level is becoming annoying real quick. For
simplest cases, it's possible to do this transformation:
f x y = ...
=>
f = {-# SCC f #-} \x y -> ...
However, it doesn't work when there's a `where` clause:
f x y = <t is in scope>
where t = ...
=>
f = {-# SCC f #-} \x y -> <t is out of scope>
where t = ...
Or when we have a "equation style" definition:
f (C1 ...) = ...
f (C2 ...) = ...
f (C3 ...) = ...
...
(usual solution is to rename `f` to `f'` and define a new `f` with a
`SCC`)
This patch implements support for SCC annotations in declaration
contexts. This is now a valid program:
f x y = ...
where
g z = ...
{-# SCC g #-}
{-# SCC f #-}
Test Plan: This passes slow validate (no new failures added).
Reviewers: goldfire, mpickering, austin, bgamari, simonmar
Reviewed By: bgamari, simonmar
Subscribers: simonmar, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D2407
|
| |
|
|
|
|
|
|
| |
* Set config settings directly in mk/test.mk, instead of indirectly in
config/ghc
* passing --hpcdir for WAY=hpc is unnecessary
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See `Note [Replacing backward slashes in config.libdir]`
There is one caveat: in ae4acbd1ba4168b867a1b5fe8de50c0199dfc1f4
I mentioned:
> Changing backwards slashes to forward slashes apparently confuses
> msys2/mingw magic path handling.
I can not reproduce that problem anymore, however.
This patch validates for me, and fixes all tests that use config.libdir
for WAY=ghci. We'll see how it goes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As discussed in Phab:D1187, this approach makes it a bit easier to
inspect the test directory while working on a new test.
The only tests that needed changes are the ones that refer to files in
ancestor directories. Those files are now copied directly into the test
directory.
validate still runs the tests in a temporary directory in /tmp, see
`Note [Running tests in /tmp]` in testsuite/driver/runtests.py.
Update submodule hpc.
Reviewed by: simonmar
Differential Revision: https://phabricator.haskell.org/D2333
GHC Trac Issues: #11980
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The aim here is to reduce the number of remote memory accesses on
systems with a NUMA memory architecture, typically multi-socket servers.
Linux provides a NUMA API for doing two things:
* Allocating memory local to a particular node
* Binding a thread to a particular node
When given the +RTS --numa flag, the runtime will
* Determine the number of NUMA nodes (N) by querying the OS
* Assign capabilities to nodes, so cap C is on node C%N
* Bind worker threads on a capability to the correct node
* Keep a separate free lists in the block layer for each node
* Allocate the nursery for a capability from node-local memory
* Allocate blocks in the GC from node-local memory
For example, using nofib/parallel/queens on a 24-core 2-socket machine:
```
$ ./Main 15 +RTS -N24 -s -A64m
Total time 173.960s ( 7.467s elapsed)
$ ./Main 15 +RTS -N24 -s -A64m --numa
Total time 150.836s ( 6.423s elapsed)
```
The biggest win here is expected to be allocating from node-local
memory, so that means programs using a large -A value (as here).
According to perf, on this program the number of remote memory accesses
were reduced by more than 50% by using `--numa`.
Test Plan:
* validate
* There's a new flag --debug-numa=<n> that pretends to do NUMA without
actually making the OS calls, which is useful for testing the code
on non-NUMA systems.
* TODO: I need to add some unit tests
Reviewers: erikd, austin, rwbarton, ezyang, bgamari, hvr, niteria
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2199
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change help message so it doesn't specify -auto-all.
Make old profiling flags deprecated as they are no longer
documented.
Update Makefile and documentation accordingly.
Update release notes for ghc 8.2
Test Plan:
./verify; `ghc --help` shouldn't specify the -auto-all
flag. Furthermore `ghc -fprof -auto-all` should emit a warning
Reviewed By: thomie, austin
Differential Revision: https://phabricator.haskell.org/D2257
GHC Trac Issues: #12084
Update submodule nofib
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Also move the `cleanup` setting from `default_testopts` to `config`. The
`cleanup` setting is the same for all tests, hence it belongs in
`config`.
Reviewed by: austin
Differential Revision: https://phabricator.haskell.org/D2148
|
|
|
|
|
|
|
|
|
|
|
| |
The -fesc flag does not exist, and has never existed.
Also delete now unused config.compiler_tags, and 'Project version' never
contains a '-'.
Reviewed by: bgamari
Differential Revision: https://phabricator.haskell.org/D2138
|
|
|
|
|
|
|
|
|
| |
Instead of just profasm and profthreaded. And at least until
-fexternal-interpreter is the default.
Also:
* WAY=profc doesn't exist anymore.
* Omit all threaded_ways for conc039, not just a few.
|
|
|
|
| |
Refactoring only.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Was broken by ce1f1607ed7f8fedd2f63c8610cafefd59baaf32. I've added a
test so that hopefully it won't break again.
Test Plan: validate & new test case
Reviewers: bgamari, austin, erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1746
GHC Trac Issues: #11304
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
(Apologies for the size of this patch, I couldn't make a smaller one
that was validate-clean and also made sense independently)
(Some of this code is derived from GHCJS.)
This commit adds support for running interpreted code (for GHCi and
TemplateHaskell) in a separate process. The functionality is
experimental, so for now it is off by default and enabled by the flag
-fexternal-interpreter.
Reaosns we want this:
* compiling Template Haskell code with -prof does not require
building the code without -prof first
* when GHC itself is profiled, it can interpret unprofiled code, and
the same applies to dynamic linking. We would no longer need to
force -dynamic-too with TemplateHaskell, and we can load ordinary
objects into a dynamically-linked GHCi (and vice versa).
* An unprofiled GHCi can load and run profiled code, which means it
can use the stack-trace functionality provided by profiling without
taking the performance hit on the compiler that profiling would
entail.
Amongst other things; see
https://ghc.haskell.org/trac/ghc/wiki/RemoteGHCi for more details.
Notes on the implementation are in Note [Remote GHCi] in the new
module compiler/ghci/GHCi.hs. It probably needs more documenting,
feel free to suggest things I could elaborate on.
Things that are not currently implemented for -fexternal-interpreter:
* The GHCi debugger
* :set prog, :set args in GHCi
* `recover` in Template Haskell
* Redirecting stdin/stdout for the external process
These are all doable, I just wanted to get to a working validate-clean
patch first.
I also haven't done any benchmarking yet. I expect there to be slight hit
to link times for byte code and some penalty due to having to
serialize/deserialize TH syntax, but I don't expect it to be a serious
problem. There's also lots of low-hanging fruit in the byte code
generator/linker that we could exploit to speed things up.
Test Plan:
* validate
* I've run parts of the test suite with
EXTRA_HC_OPTS=-fexternal-interpreter, notably tests/ghci and tests/th.
There are a few failures due to the things not currently implemented
(see above).
Reviewers: simonpj, goldfire, ezyang, austin, alanz, hvr, niteria, bgamari, gibiansky, luite
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1562
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Amazingly, there were zero changes to the byte code generator and very
few changes to the interpreter - mainly because we've used good
abstractions that hide the differences between profiling and
non-profiling. So that bit was pleasantly straightforward, but there
were a pile of other wibbles to get the whole test suite through.
Note that a compiler built with -prof is now like one built with
-dynamic, in that to use TH you have to build the code the same way.
For dynamic, we automatically enable -dynamic-too when TH is required,
but we don't have anything equivalent for profiling, so you have to
explicitly use -prof when building code that uses TH with a profiled
compiler. For this reason Cabal won't work with TH. We don't expect
to ship a profiled compiler, so I think that's OK.
Test Plan: validate with GhcProfiled=YES in validate.mk
Reviewers: goldfire, bgamari, rwbarton, austin, hvr, erikd, ezyang
Reviewed By: ezyang
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1407
GHC Trac Issues: #4837, #545
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changing backwards slashes to forward slashes apparently confuses
msys2/mingw magic path handling. I don't quite understand why, but this
fixes it.
Test Plan: on Windows, make sure PATH does not contain
'inplace/mingw/bin' (let the testsuite driver add it), then run: make
TEST='ghcilink003 ghcilink006'. Before this patch, it would fail.
Reviewed by: Phyx, bgamari, austin
Differential Revision: https://phabricator.haskell.org/D1343
|
|
|
|
|
| |
No point in pretending other compilers can use the GHC testsuite. This
makes the *.T files a bit shorter.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite config/ghc to use getStdout (which use subprocess.Popen) instead
of os.popen, which is deprecated; this also avoids the use of shell
Also:
* Move getStdout to driver/testutil.py so both config/ghc and
driver/runtests.py can use it
* Remove support for Python below 2.4, which doesn't have subprocess
Reviewed By: thomie
Differential Revision: https://phabricator.haskell.org/D908
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following tests would result in framework failures when using a ghc
build with HADDOCK_DOCS=NO in mk/build.mk or mk/validate.mk:
* haddock.Cabal
* haddock.base
* haddock.compiler
Test Plan: run make in tests/perf/haddock
Differential Revision: https://phabricator.haskell.org/D899
|
|
|
|
|
|
|
|
|
| |
And mention more prominently that `-DDEBUG` and tests that call
`compiler_stats_num_fields` don't play well together
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D799
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use format strings instead of string concatenation.
* Wrap `config.compiler`, `config.hpc` etc. in quotes in `mk/test.mk`, so we
don't have to in .T scripts and driver/testlib.py.
Update hpc submodule (test cleanup)
Reviewers: austin
Differential Revision: https://phabricator.haskell.org/D718
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a test way for debug (-g -dannot-lint) as well as a test covering
basic source tick functionality.
The debug way fails for a number of test cases because of annotation
linting: Tracing simplification (e.g. rule firings) will see
duplicated output, and sometimes expression matching might take so
long that the test case timeouts. We blacklist these tests.
(From Phabricator D169)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This is a fixup of https://phabricator.haskell.org/D233
The only difference is in findTFiles (first commit), which
previously broke Windows runner; now I translated literally
instead attempting to improve it, and checked it works.
Test Plan:
I used validate under 2,3 on Linux and under 2 on msys2.
On Windows I've seen a large number of failures, but they don't
seem to be connected with the patch.
Reviewers: hvr, simonmar, thomie, austin
Reviewed By: austin
Subscribers: thomie, carter, ezyang, simonmar
Differential Revision: https://phabricator.haskell.org/D310
GHC Trac Issues: #9184
|
|
|
|
|
|
| |
This reverts commit 084d241b316bfa12e41fc34cae993ca276bf0730.
This is a possible culprit of Windows breakage reported at ghc-devs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Most of the changes is adaptation of old Python 2 only code.
My priority was not breaking Python 2, and so I avoided bigger
changes to the driver. In particular, under Python 3 the output
is a str and buffering cannot be disabled.
To test, define PYTHON=python3 in testsuite/mk/boilerplate.mk.
Thanks to aspidites <emarshall85@gmail.com> who provided the initial patch.
Test Plan: validate under 2 and 3
Reviewers: hvr, simonmar, thomie, austin
Reviewed By: thomie, austin
Subscribers: aspidites, thomie, simonmar, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D233
GHC Trac Issues: #9184
|
| |
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
| |
|
| |
|
| |
|
|
|
|
|
| |
All tests used to use .hpc, which caused failures when running in
parallel.
|